diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2013-09-11 00:40:11 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2013-09-11 00:40:11 +0200 |
commit | cf6ed48334aa06718b29abf45b2be8ee2683a977 (patch) | |
tree | 771856834671587458bb0b141b2cf2e47ca98e84 /XMonad/Main.hsc | |
parent | 58bd42b0df4bf504cd9288b7c7e9c86753c38e75 (diff) | |
download | metatile-cf6ed48334aa06718b29abf45b2be8ee2683a977.tar metatile-cf6ed48334aa06718b29abf45b2be8ee2683a977.zip |
Add support for window borders
Diffstat (limited to 'XMonad/Main.hsc')
-rw-r--r-- | XMonad/Main.hsc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/XMonad/Main.hsc b/XMonad/Main.hsc index b5a2bf2..d09e024 100644 --- a/XMonad/Main.hsc +++ b/XMonad/Main.hsc @@ -215,7 +215,7 @@ handle (DestroyWindowEvent {ev_window = w}) = do handle (UnmapEvent {ev_window = w, ev_send_event = synthetic}) = whenX (isClient w) $ do e <- getsWindowState wsWaitingUnmap w if (synthetic || e == 0) - then unmanage w + then unmanage w >> hideParent w else modifyWindowState (\ws -> ws { wsWaitingUnmap = (wsWaitingUnmap ws) - 1 }) w -- set keyboard mapping @@ -326,6 +326,11 @@ reparent w = withDisplay $ \dpy -> do reparentWindow dpy w frame 0 0 modifyWindowState (\ws -> ws { wsFrame = frame }) w +hideParent :: Window -> X () +hideParent w = withDisplay $ \dpy -> do + frame <- getsWindowState wsFrame w + when (frame /= 0) $ io $ unmapWindow dpy frame + unparent :: Window -> X () unparent w = withDisplay $ \dpy -> do trace $ "unparent: " ++ show w |