mirror of
https://github.com/xmonad/xmonad-contrib.git
synced 2025-05-19 11:30:22 -07:00
X.H.EwmhDesktops: Fix menus in Steam client
More specifically, ignore ClientMessageEvents for unmanaged windows. Steam likes to send _NET_ACTIVE_WINDOW requests for all its windows, including override-redirect ones, which used to result in an invocation of `windows` with a no-op Endo—equivalent to a call to `refresh`. But this refresh makes Steam close its menus immediately. Fixes: https://github.com/ValveSoftware/steam-for-linux/issues/9376 Fixes: https://github.com/xmonad/xmonad/issues/451
This commit is contained in:
parent
8efff53a06
commit
3839c8bce9
@ -459,7 +459,14 @@ ewmhDesktopsEventHook'
|
||||
a_aw <- getAtom "_NET_ACTIVE_WINDOW"
|
||||
a_cw <- getAtom "_NET_CLOSE_WINDOW"
|
||||
|
||||
if | mt == a_cd, n : _ <- d, Just ww <- ws !? fi n ->
|
||||
if | mt == a_cw ->
|
||||
killWindow w
|
||||
| not (w `W.member` s) ->
|
||||
-- do nothing for unmanaged windows; it'd be just a useless
|
||||
-- refresh which breaks menus/popups of misbehaving apps that
|
||||
-- send _NET_ACTIVE_WINDOW requests for override-redirect wins
|
||||
mempty
|
||||
| mt == a_cd, n : _ <- d, Just ww <- ws !? fi n ->
|
||||
if W.currentTag s == W.tag ww then mempty else windows $ W.view (W.tag ww)
|
||||
| mt == a_cd ->
|
||||
trace $ "Bad _NET_CURRENT_DESKTOP with data=" ++ show d
|
||||
@ -473,8 +480,6 @@ ewmhDesktopsEventHook'
|
||||
if W.peek s == Just w then mempty else windows $ W.focusWindow w
|
||||
| mt == a_aw -> do
|
||||
if W.peek s == Just w then mempty else windows . appEndo =<< runQuery activateHook w
|
||||
| mt == a_cw ->
|
||||
killWindow w
|
||||
| otherwise ->
|
||||
-- The Message is unknown to us, but that is ok, not all are meant
|
||||
-- to be handled by the window manager
|
||||
|
Loading…
x
Reference in New Issue
Block a user