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, #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
  • Loading branch information
geekosaur committed Jan 19, 2024
1 parent 09e3713 commit 545218e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions XMonad/Hooks/EwmhDesktops.hs
Original file line number Diff line number Diff line change
Expand Up @@ -545,10 +545,10 @@ fullscreenEventHook'
chWstate f = io $ changeProperty32 dpy win wmstate aTOM propModeReplace (f wstate)

when (managed && typ == wmstate && fi fullsc `elem` dats) $ do
when (action == add || (action == toggle && not isFull)) $ do
when (not isFull && (action == add || action == toggle)) $ 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 545218e

Please sign in to comment.