From 721466c9558adc282a19f0604bbcac38f95ff89f Mon Sep 17 00:00:00 2001 From: brandon s allbery kf8nh Date: Thu, 18 Jan 2024 14:39:44 -0500 Subject: [PATCH] only sink window if actually fullscreened `EwmhFullscreen` unconditionally sinks windows in response to a `_NET_WM_STATE` root window message removing `_NET_WM_STATE_FULLSCREEN`. Unfortunately, at least some versions of either the Gtk or GNOME libraries send this on startup while restoring a window's last known state, which means a `manageHook` `doFloat` will be undone. This change ignores the remove if the window is not fullscreen. A followup issue, #865, has been added for the follow-on problem that the floating state of a window is not restored on removal of the fullscreen state. Fixes: #820 --- XMonad/Hooks/EwmhDesktops.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/XMonad/Hooks/EwmhDesktops.hs b/XMonad/Hooks/EwmhDesktops.hs index d1e967c5a..4db35d7f9 100644 --- a/XMonad/Hooks/EwmhDesktops.hs +++ b/XMonad/Hooks/EwmhDesktops.hs @@ -548,7 +548,7 @@ fullscreenEventHook' when (action == add || (action == toggle && not isFull)) $ do chWstate (fi fullsc:) windows . appEndo =<< runQuery fullscreenHook win - when (action == remove || (action == toggle && isFull)) $ do + when (isFull && (action == remove || action == toggle)) $ do chWstate $ delete (fi fullsc) windows . appEndo =<< runQuery unFullscreenHook win