diff options
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 |