The window does not check anything. It's your (or the window manager's) duty to know the screen size has changed.
OK. Is there a mechanism for informing the windows manager that the screen is changed?