summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--XMonad/Main.hs5
-rw-r--r--XMonad/Operations.hs1
2 files changed, 4 insertions, 2 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.
diff --git a/XMonad/Operations.hs b/XMonad/Operations.hs
index f13e2ca..5e87f32 100644
--- a/XMonad/Operations.hs
+++ b/XMonad/Operations.hs
@@ -77,7 +77,6 @@ unmanage :: Window -> X ()
unmanage w = do
windows (W.delete w)
setWMState w withdrawnState
- modify (\s -> s {mapped = S.delete w (mapped s), waitingUnmap = M.delete w (waitingUnmap s)})
-- | Modify the size of the status gap at the top of the current screen
-- Taking a function giving the current screen, and current geometry.