aboutsummaryrefslogtreecommitdiffstats
path: root/XMonad
diff options
context:
space:
mode:
authorJoachim Breitner <mail@joachim-breitner.de>2008-04-02 16:38:11 +0200
committerJoachim Breitner <mail@joachim-breitner.de>2008-04-02 16:38:11 +0200
commit9ead5a144ffacde46b0c853950cb451cedad6de0 (patch)
tree1c9d62ca9d5616c9901758b5a3aa4291f7755648 /XMonad
parentbc99bc2c41fba3f3e8e35b9ee512adeedea31d6a (diff)
downloadXMonadContrib-9ead5a144ffacde46b0c853950cb451cedad6de0.tar.gz
XMonadContrib-9ead5a144ffacde46b0c853950cb451cedad6de0.tar.xz
XMonadContrib-9ead5a144ffacde46b0c853950cb451cedad6de0.zip
_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
Diffstat (limited to 'XMonad')
-rw-r--r--XMonad/Hooks/EwmhDesktops.hs4
1 files changed, 2 insertions, 2 deletions
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