mirror of
https://github.com/xmonad/xmonad-contrib.git
synced 2025-07-31 20:21:51 -07:00
X.H.ManageDocks: Fix button events on decoration windows
Decoration windows are created using XMonad.Util.XUtils.createNewWindow
which happens to set _NET_WM_WINDOW_TYPE to _NET_WM_WINDOW_TYPE_DESKTOP,
and ManageDocks considers such windows candidates for struts and
therefore requests property events, thus overriding the original event
mask requested by decorations.
The fix is to first obtain the current event mask, set the required bits
in it only then reset the mask.
Fixes: https://github.com/xmonad/xmonad-contrib/issues/517
Fixes: ec14617123
("X.H.ManageDocks: React to strut updates of override_redirect docks")
Related: https://github.com/xmonad/X11/pull/77
This commit is contained in:
@@ -142,7 +142,8 @@ manageDocks = checkDock --> (doIgnore <+> doRequestDockEvents)
|
||||
-- (Only if not already a client to avoid overriding 'clientMask')
|
||||
requestDockEvents :: Window -> X ()
|
||||
requestDockEvents w = whenX (not <$> isClient w) $ withDisplay $ \dpy ->
|
||||
io $ selectInput dpy w (propertyChangeMask .|. structureNotifyMask)
|
||||
withWindowAttributes dpy w $ \attrs -> io $ selectInput dpy w $
|
||||
wa_your_event_mask attrs .|. propertyChangeMask .|. structureNotifyMask
|
||||
|
||||
-- | Checks if a window is a DOCK or DESKTOP window
|
||||
checkDock :: Query Bool
|
||||
|
Reference in New Issue
Block a user