From cbdee7db6fa91595d1c0711dd1f23ef19bc9eeda Mon Sep 17 00:00:00 2001 From: Tomas Janousek Date: Sat, 4 May 2024 09:20:37 +0100 Subject: [PATCH] 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: 3839c8bce99b ("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/ --- XMonad/Hooks/EwmhDesktops.hs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/XMonad/Hooks/EwmhDesktops.hs b/XMonad/Hooks/EwmhDesktops.hs index 337de252c..1d7296859 100644 --- a/XMonad/Hooks/EwmhDesktops.hs +++ b/XMonad/Hooks/EwmhDesktops.hs @@ -461,15 +461,15 @@ ewmhDesktopsEventHook' if | mt == a_cw -> killWindow w + | 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 | 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 | mt == a_d, n : _ <- d, Just ww <- ws !? fi n -> if W.findTag w s == Just (W.tag ww) then mempty else windows $ W.shiftWin (W.tag ww) w | mt == a_d ->