Hi! A follow-up to #397 (thanks for RequestSize!).
On X11, App.Maximize() does nothing and App.IsMaximized() always returns false. Both are // TODO stubs in internal/platform/x11/platform.go (lines 2394 and 2398 at 12620c9, same in v0.54.0). Windows, macOS and Wayland implement them.
Use case: in f4 (a Go file manager), Alt+F9 maximizes or restores the window, as in far2l. We now call App.Maximize() on every platform, so on X11 the key currently does nothing: unxed/f4#199
Expected:
IsMaximized() reports whether the window manager lists both _NET_WM_STATE_MAXIMIZED_VERT and _NET_WM_STATE_MAXIMIZED_HORZ in the window's _NET_WM_STATE.
Maximize() toggles based on that state. Reading the state from the WM rather than a local flag keeps the toggle right after the user maximizes with the title bar button.
Everything needed already seems to be there: the atoms in StandardAtoms, Connection.GetProperty, and Connection.Unmaximize / SetFullscreen, which send the same _NET_WM_STATE client message. Maximize would be Unmaximize with _NET_WM_STATE_ADD.
Environment: gogpu v0.53.0 (also checked v0.54.0 and main), Linux Mint (Cinnamon, X11).
Hi! A follow-up to #397 (thanks for
RequestSize!).On X11,
App.Maximize()does nothing andApp.IsMaximized()always returnsfalse. Both are// TODOstubs ininternal/platform/x11/platform.go(lines 2394 and 2398 at12620c9, same in v0.54.0). Windows, macOS and Wayland implement them.Use case: in f4 (a Go file manager), Alt+F9 maximizes or restores the window, as in far2l. We now call
App.Maximize()on every platform, so on X11 the key currently does nothing: unxed/f4#199Expected:
IsMaximized()reports whether the window manager lists both_NET_WM_STATE_MAXIMIZED_VERTand_NET_WM_STATE_MAXIMIZED_HORZin the window's_NET_WM_STATE.Maximize()toggles based on that state. Reading the state from the WM rather than a local flag keeps the toggle right after the user maximizes with the title bar button.Everything needed already seems to be there: the atoms in
StandardAtoms,Connection.GetProperty, andConnection.Unmaximize/SetFullscreen, which send the same_NET_WM_STATEclient message.Maximizewould beUnmaximizewith_NET_WM_STATE_ADD.Environment: gogpu v0.53.0 (also checked v0.54.0 and main), Linux Mint (Cinnamon, X11).