Changed window size to depend on root lifespan