aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDon Stewart <dons@cse.unsw.edu.au>2007-05-27 17:19:42 +0200
committerDon Stewart <dons@cse.unsw.edu.au>2007-05-27 17:19:42 +0200
commitc711c017500b742d21f872420db6ba6133b79da4 (patch)
tree20b845cece8aa42daf8a0d10008c1a699558f73b
parent35e4c8b344ae9831b139959727bc2206dabd0979 (diff)
downloadxmonad-c711c017500b742d21f872420db6ba6133b79da4.tar.gz
xmonad-c711c017500b742d21f872420db6ba6133b79da4.tar.xz
xmonad-c711c017500b742d21f872420db6ba6133b79da4.zip
when focus is called from an event, better refresh too, since it might have switched workspaces (so gap follows screen focus)
darcs-hash:20070527151942-9c5c1-27e63c884e4003fc003b1928ed28412e01a21764.gz
-rw-r--r--Operations.hs7
1 files changed, 6 insertions, 1 deletions
diff --git a/Operations.hs b/Operations.hs
index 741866a..32fdea9 100644
--- a/Operations.hs
+++ b/Operations.hs
@@ -213,8 +213,13 @@ setTopFocus = withWorkspace $ maybe (setFocusX =<< asks theRoot) setFocusX . W.p
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'
- setFocusX w
+ refresh -- and set gap -- was: setFocusX w
else whenX (isRoot w) $ setFocusX w
+ -- 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.
+ --
+ -- to get the gap though, you need to trigger a refresh.
-- | Call X to set the keyboard focus details.
setFocusX :: Window -> X ()