From de232bec7a62f6547313058962fc2ae93447106c Mon Sep 17 00:00:00 2001 From: Devin Mullins Date: Thu, 18 Oct 2007 04:16:51 +0200 Subject: change 0/1/3 to named states, per X11-extras darcs head darcs-hash:20071018021651-78224-8fec22f72aef271d8d6298975e6f7d5e1550613b.gz --- Operations.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Operations.hs') diff --git a/Operations.hs b/Operations.hs index 9343f06..fa9c5b7 100644 --- a/Operations.hs +++ b/Operations.hs @@ -77,7 +77,7 @@ manage w = whenX (fmap not $ isClient w) $ withDisplay $ \d -> do unmanage :: Window -> X () unmanage w = do windows (W.delete w) - setWMState w 0 {-withdrawn-} + setWMState w withdrawnState modify (\s -> s {mapped = S.delete w (mapped s), waitingUnmap = M.delete w (waitingUnmap s)}) -- | Modify the size of the status gap at the top of the current screen @@ -190,7 +190,7 @@ hide w = whenX (gets (S.member w . mapped)) $ withDisplay $ \d -> do io $ do selectInput d w (clientMask .&. complement structureNotifyMask) unmapWindow d w selectInput d w clientMask - setWMState w 3 --iconic + setWMState w iconicState -- this part is key: we increment the waitingUnmap counter to distinguish -- between client and xmonad initiated unmaps. modify (\s -> s { waitingUnmap = M.insertWith (+) w 1 (waitingUnmap s) @@ -200,7 +200,7 @@ hide w = whenX (gets (S.member w . mapped)) $ withDisplay $ \d -> do -- this is harmless if the window was already visible reveal :: Window -> X () reveal w = withDisplay $ \d -> do - setWMState w 1 --normal + setWMState w normalState io $ mapWindow d w modify (\s -> s { mapped = S.insert w (mapped s) }) -- cgit v1.2.3