summaryrefslogtreecommitdiffstats
path: root/XMonad/Main.hs
diff options
context:
space:
mode:
Diffstat (limited to 'XMonad/Main.hs')
-rw-r--r--XMonad/Main.hs5
1 files changed, 4 insertions, 1 deletions
diff --git a/XMonad/Main.hs b/XMonad/Main.hs
index c25eabf..60d8e6a 100644
--- a/XMonad/Main.hs
+++ b/XMonad/Main.hs
@@ -143,7 +143,10 @@ handle (MapRequestEvent {ev_window = w}) = withDisplay $ \dpy -> do
-- window destroyed, unmanage it
-- window gone, unmanage it
-handle (DestroyWindowEvent {ev_window = w}) = whenX (isClient w) $ unmanage w
+handle (DestroyWindowEvent {ev_window = w}) = whenX (isClient w) $ do
+ unmanage w
+ modify (\s -> s { mapped = S.delete w (mapped s)
+ , waitingUnmap = M.delete w (waitingUnmap s)})
-- We track expected unmap events in waitingUnmap. We ignore this event unless
-- it is synthetic or we are not expecting an unmap notification from a window.