summaryrefslogtreecommitdiffstats
path: root/XMonad
diff options
context:
space:
mode:
Diffstat (limited to 'XMonad')
-rw-r--r--XMonad/Main.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/XMonad/Main.hs b/XMonad/Main.hs
index a312333..c25eabf 100644
--- a/XMonad/Main.hs
+++ b/XMonad/Main.hs
@@ -151,7 +151,9 @@ handle (UnmapEvent {ev_window = w, ev_send_event = synthetic}) = whenX (isClient
e <- gets (fromMaybe 0 . M.lookup w . waitingUnmap)
if (synthetic || e == 0)
then unmanage w
- else modify (\s -> s { waitingUnmap = M.adjust pred w (waitingUnmap s) })
+ else modify (\s -> s { waitingUnmap = M.update mpred w (waitingUnmap s) })
+ where mpred 1 = Nothing
+ mpred n = Just $ pred n
-- set keyboard mapping
handle e@(MappingNotifyEvent {}) = do