Skip to content

Commit cbdee7d

Browse files
committed
X.H.EwmhDesktops: Fix _NET_CURRENT_DESKTOP handling
_NET_CURRENT_DESKTOP doesn't act on a specific window and its ev_window is set to the root window, but the root window is considered unmanaged so this would be caught by the "not member" guard and ignored. We need to move the guard a bit further down. Fixes: 3839c8b ("X.H.EwmhDesktops: Fix menus in Steam client") Fixes: https://old.reddit.com/r/xmonad/comments/1cfclhh/psa_steam_fixes_merged_to_xmonadcontrib_master/l2hjwuy/
1 parent 0622ed1 commit cbdee7d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Diff for: XMonad/Hooks/EwmhDesktops.hs

+4-4
Original file line numberDiff line numberDiff line change
@@ -461,15 +461,15 @@ ewmhDesktopsEventHook'
461461

462462
if | mt == a_cw ->
463463
killWindow w
464+
| mt == a_cd, n : _ <- d, Just ww <- ws !? fi n ->
465+
if W.currentTag s == W.tag ww then mempty else windows $ W.view (W.tag ww)
466+
| mt == a_cd ->
467+
trace $ "Bad _NET_CURRENT_DESKTOP with data=" ++ show d
464468
| not (w `W.member` s) ->
465469
-- do nothing for unmanaged windows; it'd be just a useless
466470
-- refresh which breaks menus/popups of misbehaving apps that
467471
-- send _NET_ACTIVE_WINDOW requests for override-redirect wins
468472
mempty
469-
| mt == a_cd, n : _ <- d, Just ww <- ws !? fi n ->
470-
if W.currentTag s == W.tag ww then mempty else windows $ W.view (W.tag ww)
471-
| mt == a_cd ->
472-
trace $ "Bad _NET_CURRENT_DESKTOP with data=" ++ show d
473473
| mt == a_d, n : _ <- d, Just ww <- ws !? fi n ->
474474
if W.findTag w s == Just (W.tag ww) then mempty else windows $ W.shiftWin (W.tag ww) w
475475
| mt == a_d ->

0 commit comments

Comments
 (0)