From 654a254e3cda6c55e40df3942cbe2fc7f4e8be7f Mon Sep 17 00:00:00 2001 From: Don Stewart Date: Sun, 27 May 2007 17:19:42 +0200 Subject: 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 --- Operations.hs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 () -- cgit v1.2.3