From 41ba7fd0d34090b98cd46c16c84a7fb62e2cceec Mon Sep 17 00:00:00 2001 From: Tomas Janousek Date: Wed, 4 Nov 2020 18:56:47 +0000 Subject: [PATCH] X.H.EwmhDesktops: Fix _NET_ACTIVE_WINDOW requests from pagers being ignored This makes window switching apps like rofi and alttab able to activate windows even if the logHook doesn't activate them (which it doesn't by default, and that's a regression). Fixes: 45052b984dbe ("X.H.EwmhDesktops. run 'logHook' for activated window.") Related: https://github.com/xmonad/xmonad-contrib/issues/396 Related: https://github.com/xmonad/xmonad-contrib/pull/110 Related: https://github.com/xmonad/xmonad-contrib/pull/192 --- XMonad/Hooks/EwmhDesktops.hs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/XMonad/Hooks/EwmhDesktops.hs b/XMonad/Hooks/EwmhDesktops.hs index 8d01e082c3..6aa7815251 100644 --- a/XMonad/Hooks/EwmhDesktops.hs +++ b/XMonad/Hooks/EwmhDesktops.hs @@ -265,6 +265,10 @@ handle f ClientMessageEvent{ev_window = w, ev_message_type = mt, ev_data = d} = windows $ W.shiftWin (W.tag ww) w | mt == a_d -> trace $ "Bad _NET_WM_DESKTOP with data=" ++ show d + | mt == a_aw, 2 : _ <- d -> + -- when the request comes from a pager, honor it unconditionally + -- https://specifications.freedesktop.org/wm-spec/wm-spec-1.3.html#sourceindication + windows $ W.focusWindow w | mt == a_aw -> do lh <- asks (logHook . config) XS.put (NetActivated (Just w))