Window::SetFullScreen() / IsFullScreen() exist on all three desktop platforms, but there is no event when a window enters or leaves full screen. That includes changes the user triggers (the green button on macOS, F11 / the window manager on Linux). Apps that change their layout in full screen currently have to poll.
Proposal: add a WindowFullScreenChangedEvent (or an entered/left pair), emitted:
- macOS:
NSWindowDidEnterFullScreenNotification / NSWindowDidExitFullScreenNotification
- Windows: from
SetFullScreen(), which is the only way in since Win32 has no native full-screen state. Note that WM_SIZE arrives with SIZE_RESTORED, so it can't be detected from the size message.
- Linux:
window-state-event with GDK_WINDOW_STATE_FULLSCREEN
It should also be checked that the Windows SetFullScreen() restores the style and title bar correctly on exit (see leanflutter/window_manager#579 and #569).
Background:
Window::SetFullScreen()/IsFullScreen()exist on all three desktop platforms, but there is no event when a window enters or leaves full screen. That includes changes the user triggers (the green button on macOS, F11 / the window manager on Linux). Apps that change their layout in full screen currently have to poll.Proposal: add a
WindowFullScreenChangedEvent(or an entered/left pair), emitted:NSWindowDidEnterFullScreenNotification/NSWindowDidExitFullScreenNotificationSetFullScreen(), which is the only way in since Win32 has no native full-screen state. Note thatWM_SIZEarrives withSIZE_RESTORED, so it can't be detected from the size message.window-state-eventwithGDK_WINDOW_STATE_FULLSCREENIt should also be checked that the Windows
SetFullScreen()restores the style and title bar correctly on exit (see leanflutter/window_manager#579 and #569).Background: