aboutsummaryrefslogtreecommitdiffstats
path: root/Operations.hs
diff options
context:
space:
mode:
authorJason Creighton <jcreigh@gmail.com>2007-05-21 05:14:35 +0200
committerJason Creighton <jcreigh@gmail.com>2007-05-21 05:14:35 +0200
commit5640ca091c6a7f4544d6e0481d6bed593b4db5dc (patch)
treef464142bbac792b30fd791f7121e1453f9eda361 /Operations.hs
parent2894b9690d05ec82948877bbc9c2518416375752 (diff)
downloadxmonad-5640ca091c6a7f4544d6e0481d6bed593b4db5dc.tar.gz
xmonad-5640ca091c6a7f4544d6e0481d6bed593b4db5dc.tar.xz
xmonad-5640ca091c6a7f4544d6e0481d6bed593b4db5dc.zip
only hide old workspace on view if the old workspace is not visible (Xinerama)
darcs-hash:20070521031435-b9aa7-2a3825712b36c5ef267c89286006d0ea0073c57d.gz
Diffstat (limited to '')
-rw-r--r--Operations.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/Operations.hs b/Operations.hs
index 61be821..055675a 100644
--- a/Operations.hs
+++ b/Operations.hs
@@ -67,7 +67,9 @@ shift n = withFocused hide >> windows (W.shift n)
view :: WorkspaceId -> X ()
view n = withWorkspace $ \w -> when (n /= (W.tag (W.current w))) $ do
windows $ W.view n -- move in new workspace first, to avoid flicker
- mapM_ hide (W.index w) -- now just hide the old workspace
+ -- Hide the old workspace if it is no longer visible
+ oldWsNotVisible <- (not . M.member (W.tag . W.current $ w) . W.screens) `liftM` gets workspace
+ when oldWsNotVisible $ mapM_ hide (W.index w)
clearEnterEvents -- better clear any events from the old workspace
-- | Kill the currently focused client. If we do kill it, we'll get a