Make windows responsible for setting withdrawn state

This commit is contained in:
Spencer Janssen
2007-12-11 08:01:17 +00:00
parent 56463b2391
commit 5166ede96b

View File

@@ -72,9 +72,7 @@ manage w = whenX (not <$> isClient w) $ withDisplay $ \d -> do
-- list, on whatever workspace it is. -- list, on whatever workspace it is.
-- --
unmanage :: Window -> X () unmanage :: Window -> X ()
unmanage w = do unmanage = windows . W.delete
windows (W.delete w)
setWMState w withdrawnState
-- | Modify the size of the status gap at the top of the current screen -- | Modify the size of the status gap at the top of the current screen
-- Taking a function giving the current screen, and current geometry. -- Taking a function giving the current screen, and current geometry.
@@ -113,7 +111,10 @@ windows f = do
let oldvisible = concatMap (W.integrate' . W.stack . W.workspace) $ W.current old : W.visible old let oldvisible = concatMap (W.integrate' . W.stack . W.workspace) $ W.current old : W.visible old
ws = f old ws = f old
XConf { display = d , normalBorder = nbc, focusedBorder = fbc } <- ask XConf { display = d , normalBorder = nbc, focusedBorder = fbc } <- ask
mapM_ setInitialProperties (W.allWindows ws \\ W.allWindows old) mapM_ setInitialProperties (W.allWindows ws \\ W.allWindows old)
mapM_ (flip setWMState withdrawnState) (W.allWindows old \\ W.allWindows ws)
whenJust (W.peek old) $ \otherw -> io $ setWindowBorder d otherw nbc whenJust (W.peek old) $ \otherw -> io $ setWindowBorder d otherw nbc
modify (\s -> s { windowset = ws }) modify (\s -> s { windowset = ws })