From a46949eab008a218fb94a8deae83cc74f6154638 Mon Sep 17 00:00:00 2001 From: David Roundy Date: Sat, 29 Sep 2007 01:53:46 +0200 Subject: set border color more judiciously, so layouts can customize this. darcs-hash:20070928235346-72aca-17cd52d57210ca1260e401faa7d7fa9e2add6586 --- Operations.hs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Operations.hs b/Operations.hs index 200600c..ee58161 100644 --- a/Operations.hs +++ b/Operations.hs @@ -118,8 +118,9 @@ windows f = do XState { windowset = old } <- get let oldvisible = concatMap (W.integrate' . W.stack . W.workspace) $ W.current old : W.visible old ws = f old + XConf { display = d , normalBorder = nbc, focusedBorder = fbc } <- ask + whenJust (W.peek old) $ \otherw -> io $ setWindowBorder d otherw nbc modify (\s -> s { windowset = ws }) - d <- asks display -- notify non visibility let tags_oldvisible = map (W.tag . W.workspace) $ W.current old : W.visible old @@ -163,6 +164,7 @@ windows f = do -- return the visible windows for this workspace: return vs + whenJust (W.peek ws) $ \w -> io $ setWindowBorder d w fbc setTopFocus logHook -- io performGC -- really helps, but seems to trigger GC bugs? @@ -284,19 +286,17 @@ focus w = withWindowSet $ \s -> do -- | Call X to set the keyboard focus details. setFocusX :: Window -> X () setFocusX w = withWindowSet $ \ws -> do - XConf { display = dpy , normalBorder = nbc, focusedBorder = fbc } <- ask + dpy <- asks display -- clear mouse button grab and border on other windows forM_ (W.current ws : W.visible ws) $ \wk -> do forM_ (W.index (W.view (W.tag (W.workspace wk)) ws)) $ \otherw -> do setButtonGrab True otherw - io $ setWindowBorder dpy otherw nbc -- If we ungrab buttons on the root window, we lose our mouse bindings. whenX (not `liftM` isRoot w) $ setButtonGrab False w io $ do setInputFocus dpy w revertToPointerRoot 0 -- raiseWindow dpy w - io $ setWindowBorder dpy w fbc -- | Throw a message to the current Layout possibly modifying how we -- layout the windows, then refresh. -- cgit v1.2.3