summaryrefslogtreecommitdiffstats
path: root/XMonad
diff options
context:
space:
mode:
authorTomas Janousek <tomi@nomi.cz>2010-03-27 22:42:43 +0100
committerTomas Janousek <tomi@nomi.cz>2010-03-27 22:42:43 +0100
commit1da393f20830d154d01086136371b001846c9a9e (patch)
tree43d1a661473a68607780290cc92d12dd51d7500f /XMonad
parent96ea8f3cdae6212010f845308b1aae533a5afa8a (diff)
downloadmetatile-1da393f20830d154d01086136371b001846c9a9e.tar
metatile-1da393f20830d154d01086136371b001846c9a9e.zip
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
Diffstat (limited to 'XMonad')
-rw-r--r--XMonad/Operations.hs2
1 files changed, 1 insertions, 1 deletions
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