macos: Fix window state of initially maximized windows
GdkSurface maintains state that shadows the actual window state. This state is not always updated in the macos backend.
In our case, when a window is initially maximized, setFrame:display:
was called and inMaximizeTransition
was set. However,
windowDidEndLiveResize:
was never called and inMaximizeTransition
was never unset, making the application think the window is still
maximized.
Additionally, windowShouldZoom:toFrame:
is only called when the window
is maximized, not when it's unmaximized.
By checking and setting the state in windowDidResize:
we can at least
be sure that the internal maximized state is only set if the window
takes up all desktop space: the screen's visible frame.
Fixes #5898 (closed)
Edited by Arjan Molenaar