From fa9f240c658446d89c98f1ba6589b2b34472a3b8 Mon Sep 17 00:00:00 2001 From: Spencer Janssen Date: Tue, 11 Dec 2007 08:45:06 +0100 Subject: Delete windows from waitingUnmap that aren't waitng for any unmaps darcs-hash:20071211074506-a5988-86d61a18c3480ed6aab7acac068c59b5db062b81 --- XMonad/Main.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'XMonad') 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 -- cgit v1.2.3