diff options
author | Stefan O'Rear <stefanor@cox.net> | 2007-06-09 20:58:35 +0200 |
---|---|---|
committer | Stefan O'Rear <stefanor@cox.net> | 2007-06-09 20:58:35 +0200 |
commit | 439754046a557ad9e3f6401c1eb38dfa26e46048 (patch) | |
tree | 96c230c076cee3c7af37ca56d04265a805e6319c /Operations.hs | |
parent | c29c5cde24675e152e0cff754b32db7b2b59bfa0 (diff) | |
download | xmonad-439754046a557ad9e3f6401c1eb38dfa26e46048.tar.gz xmonad-439754046a557ad9e3f6401c1eb38dfa26e46048.tar.xz xmonad-439754046a557ad9e3f6401c1eb38dfa26e46048.zip |
Give refresh sole responsibility for establishing window properties (-3 loc)
darcs-hash:20070609185835-e3110-4561eca8bf83e9d05d90cdd75bc1ddce5855087f.gz
Diffstat (limited to 'Operations.hs')
-rw-r--r-- | Operations.hs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Operations.hs b/Operations.hs index 0716533..2c290f3 100644 --- a/Operations.hs +++ b/Operations.hs @@ -45,7 +45,7 @@ import Graphics.X11.Xlib.Extras -- manage :: Window -> X () manage w = withDisplay $ \d -> do - setInitialProperties w >> reveal w + setInitialProperties w -- we need this so that the modify below will not capture the wrong border size... -- FIXME: This is pretty awkward. We can't can't let "refresh" happen -- before the call to float, because that will resize the window and @@ -201,6 +201,7 @@ setWMState w v = withDisplay $ \dpy -> do -- | hide. Hide a window by unmapping it, and setting Iconified. hide :: Window -> X () hide w = whenX (gets (S.member w . mapped)) $ withDisplay $ \d -> do + setInitialProperties w io $ do selectInput d w (clientMask .&. complement structureNotifyMask) unmapWindow d w selectInput d w clientMask @@ -214,6 +215,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 + setInitialProperties w setWMState w 1 --normal io $ mapWindow d w modify (\s -> s { mapped = S.insert w (mapped s) }) |