From 80b835ac57c7dba6d86ac803baa784814b3c300b Mon Sep 17 00:00:00 2001 From: Tomas Janousek Date: Sat, 27 Mar 2010 22:42:43 +0100 Subject: reveal: don't insert non-clients into the set of mapped windows Ignore-this: 68c0a43d761e626cb9544ca386f4846d In xmonad-core, this fixes a small bug that caused doIgnored windows to get into `mapped' and never being removed from there. In the context of xmonad-contrib, this fixes a tremendous memory leak that could be triggered by using MouseResizableTile and UrgencyHook at the same time. MRT would create dummy windows that would get added to `mapped' by the reveal call in `windows'. As these were not removed (removal from `mapped' is filtered by `isClient'), they'd stay there forever and due to an inefficiency in UrgencyHook would eat up all memory sooner or later. darcs-hash:20100327214243-c9ff5-295429351d7a76e3fe82766bed70cb6951f5862e.gz --- XMonad/Operations.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'XMonad') diff --git a/XMonad/Operations.hs b/XMonad/Operations.hs index f0391bc..e26d733 100644 --- a/XMonad/Operations.hs +++ b/XMonad/Operations.hs @@ -200,7 +200,7 @@ reveal :: Window -> X () reveal w = withDisplay $ \d -> do setWMState w normalState io $ mapWindow d w - modify (\s -> s { mapped = S.insert w (mapped s) }) + whenX (isClient w) $ modify (\s -> s { mapped = S.insert w (mapped s) }) -- | The client events that xmonad is interested in clientMask :: EventMask -- cgit v1.2.3