diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2013-09-11 16:22:33 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2013-09-11 16:22:33 +0200 |
commit | ccbc4c12236407083f3a3ebcd2d53be762f35eb5 (patch) | |
tree | 083654ca237e0d7d01c46a4e9590ee37a6eae8a4 | |
parent | 5ecc5d245c1733fcf6433c1ed710b715b8a1eabb (diff) | |
download | metatile-ccbc4c12236407083f3a3ebcd2d53be762f35eb5.tar metatile-ccbc4c12236407083f3a3ebcd2d53be762f35eb5.zip |
Correctly handle synthetic unmap events
-rw-r--r-- | XMonad/Main.hsc | 9 |
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 |