summaryrefslogtreecommitdiffstats
path: root/XMonad/Main.hsc
diff options
context:
space:
mode:
Diffstat (limited to 'XMonad/Main.hsc')
-rw-r--r--XMonad/Main.hsc9
1 files changed, 4 insertions, 5 deletions
diff --git a/XMonad/Main.hsc b/XMonad/Main.hsc
index 706c5a0..224631c 100644
--- a/XMonad/Main.hsc
+++ b/XMonad/Main.hsc
@@ -214,11 +214,10 @@ handle (DestroyWindowEvent {ev_window = w}) = do
-- it is synthetic or we are not expecting an unmap notification from a window.
handle UnmapEvent {ev_window = w, ev_send_event = synthetic, ev_event = we} = whenX (isClient w) $ do
rootw <- asks theRoot
- when (we /= rootw) $ do
- e <- getsWindowState wsWaitingUnmap w
- if (synthetic || e == 0)
- then unmanage w >> hideParent w
- else modifyWindowState (\ws -> ws { wsWaitingUnmap = (wsWaitingUnmap ws) - 1 }) w
+ e <- getsWindowState wsWaitingUnmap w
+ if (synthetic || (e == 0 && we /= rootw))
+ then unmanage w >> hideParent w
+ else when (e > 0) $ modifyWindowState (\ws -> ws { wsWaitingUnmap = e - 1 }) w
-- set keyboard mapping
handle e@(MappingNotifyEvent {}) = do