Skip to content

Commit

Permalink
only sink window if actually fullscreened
Browse files Browse the repository at this point in the history
`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, xmonad#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: xmonad#820
  • Loading branch information
geekosaur committed Jan 18, 2024
1 parent 09e3713 commit 721466c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion XMonad/Hooks/EwmhDesktops.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 721466c

Please sign in to comment.