mirror of
https://github.com/xmonad/xmonad.git
synced 2025-08-09 16:41:51 -07:00
Clean up stale mapped/waitingUnmap state in handle rather than unmanage.
This is an attempt to fix issue #96. Thanks to jcreigh for the insights necessary to fix the bug.
This commit is contained in:
@@ -143,7 +143,10 @@ handle (MapRequestEvent {ev_window = w}) = withDisplay $ \dpy -> do
|
|||||||
|
|
||||||
-- window destroyed, unmanage it
|
-- window destroyed, unmanage it
|
||||||
-- window gone, 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
|
-- 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.
|
-- it is synthetic or we are not expecting an unmap notification from a window.
|
||||||
|
@@ -77,7 +77,6 @@ unmanage :: Window -> X ()
|
|||||||
unmanage w = do
|
unmanage w = do
|
||||||
windows (W.delete w)
|
windows (W.delete w)
|
||||||
setWMState w withdrawnState
|
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
|
-- | Modify the size of the status gap at the top of the current screen
|
||||||
-- Taking a function giving the current screen, and current geometry.
|
-- Taking a function giving the current screen, and current geometry.
|
||||||
|
Reference in New Issue
Block a user