If a window is fullscreen and the maximized state is requested, it needs to be explicitly entered after leaving fullscreen, or the resulting window will be in the maximized state, but still the size of the non-maximized window.