summaryrefslogtreecommitdiffstats
path: root/XMonad
diff options
context:
space:
mode:
authorSpencer Janssen <sjanssen@cse.unl.edu>2008-04-30 03:40:12 +0200
committerSpencer Janssen <sjanssen@cse.unl.edu>2008-04-30 03:40:12 +0200
commit396aa50e300c68f28f2bafdfe8ef974b60cfb28d (patch)
tree75516741344cf405681ed85525a931ec211f33f4 /XMonad
parentdd9abde912a7c456b1885c03d490cf5714cf7312 (diff)
downloadmetatile-396aa50e300c68f28f2bafdfe8ef974b60cfb28d.tar
metatile-396aa50e300c68f28f2bafdfe8ef974b60cfb28d.zip
Hide newly created but non-visible windows (fixes bug #172)
darcs-hash:20080430014012-a5988-a203e733895ee2aa3839a266df0f8b19aa3c0763
Diffstat (limited to 'XMonad')
-rw-r--r--XMonad/Operations.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/XMonad/Operations.hs b/XMonad/Operations.hs
index f6c927e..6a45553 100644
--- a/XMonad/Operations.hs
+++ b/XMonad/Operations.hs
@@ -103,6 +103,7 @@ windows :: (WindowSet -> WindowSet) -> X ()
windows f = do
XState { windowset = old } <- get
let oldvisible = concatMap (W.integrate' . W.stack . W.workspace) $ W.current old : W.visible old
+ newwindows = W.allWindows ws \\ W.allWindows old
ws = f old
XConf { display = d , normalBorder = nbc, focusedBorder = fbc } <- ask
@@ -155,7 +156,7 @@ windows f = do
-- hide every window that was potentially visible before, but is not
-- given a position by a layout now.
- mapM_ hide (nub oldvisible \\ visible)
+ mapM_ hide (nub (oldvisible ++ newwindows) \\ visible)
-- all windows that are no longer in the windowset are marked as
-- withdrawn, it is important to do this after the above, otherwise 'hide'