openbsd-ports/x11/xmonad/patches/patch-XMonad_Operations_hs

43 lines
1.8 KiB
Plaintext

$OpenBSD: patch-XMonad_Operations_hs,v 1.2 2008/02/03 18:17:51 kili Exp $
Backport for ghc-6.6 and X11-extras.
--- XMonad/Operations.hs.orig Sun Jan 27 23:02:10 2008
+++ XMonad/Operations.hs Mon Jan 28 20:37:49 2008
@@ -170,7 +170,7 @@ windows f = do
-- all windows that are no longer in the windowset are marked as
-- withdrawn, it is important to do this after the above, otherwise 'hide'
-- will overwrite withdrawnState with iconicState
- mapM_ (flip setWMState withdrawnState) (W.allWindows old \\ W.allWindows ws)
+ mapM_ (flip setWMState 0) (W.allWindows old \\ W.allWindows ws)
clearEvents enterWindowMask
@@ -186,7 +186,7 @@ hide w = whenX (gets (S.member w . mapped)) $ withDisp
io $ do selectInput d w (clientMask .&. complement structureNotifyMask)
unmapWindow d w
selectInput d w clientMask
- setWMState w iconicState
+ setWMState w 3
-- 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)
@@ -196,7 +196,7 @@ hide w = whenX (gets (S.member w . mapped)) $ withDisp
-- this is harmless if the window was already visible
reveal :: Window -> X ()
reveal w = withDisplay $ \d -> do
- setWMState w normalState
+ setWMState w 1
io $ mapWindow d w
modify (\s -> s { mapped = S.insert w (mapped s) })
@@ -207,7 +207,7 @@ clientMask = structureNotifyMask .|. enterWindowMask .
-- | Set some properties when we initially gain control of a window
setInitialProperties :: Window -> X ()
setInitialProperties w = asks normalBorder >>= \nb -> withDisplay $ \d -> do
- setWMState w iconicState
+ setWMState w 3
io $ selectInput d w $ clientMask
bw <- asks (borderWidth . config)
io $ setWindowBorderWidth d w bw