aboutsummaryrefslogtreecommitdiffstats
path: root/Operations.hs
diff options
context:
space:
mode:
authorDon Stewart <dons@cse.unsw.edu.au>2007-05-27 17:32:11 +0200
committerDon Stewart <dons@cse.unsw.edu.au>2007-05-27 17:32:11 +0200
commitf18a4a64da8e5e5e295cf676e5a56e6f1f1003b3 (patch)
treee10d35f79ef9e383560e4d9e8e5a1c8353340e32 /Operations.hs
parentc711c017500b742d21f872420db6ba6133b79da4 (diff)
downloadxmonad-f18a4a64da8e5e5e295cf676e5a56e6f1f1003b3.tar.gz
xmonad-f18a4a64da8e5e5e295cf676e5a56e6f1f1003b3.tar.xz
xmonad-f18a4a64da8e5e5e295cf676e5a56e6f1f1003b3.zip
comments on alternative gap movement policies
darcs-hash:20070527153211-9c5c1-0a36be7dd8b8181597f21e362ac735b343746b79.gz
Diffstat (limited to 'Operations.hs')
-rw-r--r--Operations.hs3
1 files changed, 3 insertions, 0 deletions
diff --git a/Operations.hs b/Operations.hs
index 32fdea9..e1ee0cd 100644
--- a/Operations.hs
+++ b/Operations.hs
@@ -210,11 +210,14 @@ setTopFocus :: X ()
setTopFocus = withWorkspace $ maybe (setFocusX =<< asks theRoot) setFocusX . W.peek
-- | Set focus explicitly to window 'w' if it is managed by us, or root.
+-- This happens if X notices we've moved the mouse (and perhaps moved
+-- the mouse to a new screen).
focus :: Window -> X ()
focus w = withWorkspace $ \s -> do
if W.member w s then do modify $ \st -> st { windowset = W.focusWindow w s } -- avoid 'refresh'
refresh -- and set gap -- was: setFocusX w
else whenX (isRoot w) $ setFocusX w
+ -- we could refresh here, moving gap too.
-- XXX a focus change could be caused by switching workspaces in xinerama.
-- if so, and the gap is in use, the gap should probably follow the
-- cursor to the new screen.