From 9ead5a144ffacde46b0c853950cb451cedad6de0 Mon Sep 17 00:00:00 2001 From: Joachim Breitner Date: Wed, 2 Apr 2008 16:38:11 +0200 Subject: _NET_ACTIVE_WINDOW moves windows if necessary This makes EWMH behave a bit more like metacity: If _NET_ACTIVE_WINDOW is received and the window is not on the current worspace, it is brought here (instead of the workspace switched to the other one). So for example, if you click on the pidgin icon in the panel and the buddy list is already open some where it is moved here. darcs-hash:20080402143811-23c07-f69d9958d0a08679329c21aa3855942dd7ffbb22.gz --- XMonad/Hooks/EwmhDesktops.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'XMonad') diff --git a/XMonad/Hooks/EwmhDesktops.hs b/XMonad/Hooks/EwmhDesktops.hs index 4cf7432..50959ed 100644 --- a/XMonad/Hooks/EwmhDesktops.hs +++ b/XMonad/Hooks/EwmhDesktops.hs @@ -100,7 +100,7 @@ ewmhDesktopsLogHook = withWindowSet $ \s -> do -- -- * _NET_WM_DESKTOP (move windows to other desktops) -- --- * _NET_ACTIVE_WINDOW (activate another window) +-- * _NET_ACTIVE_WINDOW (activate another window, possibly moving to the current desktop) -- ewmhDesktopsLayout :: layout a -> HandleEvent EwmhDesktopsHook layout a ewmhDesktopsLayout = eventHook EwmhDesktopsHook @@ -133,7 +133,7 @@ handle ClientMessageEvent { windows $ W.shiftWin (W.tag (ws !! n)) w else trace $ "Bad _NET_DESKTOP with data[0]="++show n else if mt == a_aw then do - windows $ W.focusWindow w + windows $ W.focusWindow w . W.shiftWin (W.tag (W.workspace (W.current s))) w else trace $ "Unknown ClientMessageEvent " ++ show mt handle _ = undefined -- does not happen, as otherwise ewmhDesktopsHook would not match -- cgit v1.2.3