diff options
author | David Roundy <droundy@darcs.net> | 2007-09-29 01:53:46 +0200 |
---|---|---|
committer | David Roundy <droundy@darcs.net> | 2007-09-29 01:53:46 +0200 |
commit | a46949eab008a218fb94a8deae83cc74f6154638 (patch) | |
tree | b5aee0a8ec5e745908488a7d8e9b49e29c98a350 | |
parent | 575fdfb8c722f37566068ca40acd4699816dfb87 (diff) | |
download | metatile-a46949eab008a218fb94a8deae83cc74f6154638.tar metatile-a46949eab008a218fb94a8deae83cc74f6154638.zip |
set border color more judiciously, so layouts can customize this.
darcs-hash:20070928235346-72aca-17cd52d57210ca1260e401faa7d7fa9e2add6586
-rw-r--r-- | Operations.hs | 8 |
1 files 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. |