Skip to content

Commit

Permalink
X.H.EwmhDesktops: Fix _NET_ACTIVE_WINDOW requests from pagers being i…
Browse files Browse the repository at this point in the history
…gnored

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).

Related: xmonad#396
Related: xmonad#110
  • Loading branch information
liskin committed Nov 5, 2020
1 parent 2f385b1 commit b88fd58
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions XMonad/Hooks/EwmhDesktops.hs
Original file line number Diff line number Diff line change
Expand Up @@ -271,9 +271,14 @@ handle f (ClientMessageEvent {ev_window = w, ev_message_type = mt, ev_data = d})
| otherwise -> trace $ "Bad _NET_DESKTOP with data[0]="++show n
_ -> trace $ "Bad _NET_DESKTOP with data="++show d
| mt == a_aw -> do
lh <- asks (logHook . config)
XS.put (NetActivated (Just w))
lh
case d of
-- when the request comes from a pager, honor it unconditionally
-- https://specifications.freedesktop.org/wm-spec/wm-spec-1.3.html#sourceindication
(2:_) -> windows $ W.focusWindow w
_ -> do
lh <- asks (logHook . config)
XS.put (NetActivated (Just w))
lh
| mt == a_cw ->
killWindow w
| otherwise ->
Expand Down

0 comments on commit b88fd58

Please sign in to comment.