summaryrefslogtreecommitdiffstats
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
commit654a254e3cda6c55e40df3942cbe2fc7f4e8be7f (patch)
tree20b845cece8aa42daf8a0d10008c1a699558f73b
parent659411687c04f6e07a39a92717ec6dc0895b9918 (diff)
downloadmetatile-654a254e3cda6c55e40df3942cbe2fc7f4e8be7f.tar
metatile-654a254e3cda6c55e40df3942cbe2fc7f4e8be7f.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
-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 ()