aboutsummaryrefslogtreecommitdiffstats
path: root/Main.hs
diff options
context:
space:
mode:
authorJason Creighton <jcreigh@gmail.com>2007-03-25 22:37:02 +0200
committerJason Creighton <jcreigh@gmail.com>2007-03-25 22:37:02 +0200
commit57ddcae345300ae4f2ff45fe5057eaa43f2c2621 (patch)
tree0ba0a63c12c8471aec5482e86c32257ea1a3c24c /Main.hs
parent7357ee0ad88da98ed46dc05cc1ae02a96cc775f3 (diff)
downloadxmonad-57ddcae345300ae4f2ff45fe5057eaa43f2c2621.tar.gz
xmonad-57ddcae345300ae4f2ff45fe5057eaa43f2c2621.tar.xz
xmonad-57ddcae345300ae4f2ff45fe5057eaa43f2c2621.zip
Xinerama focus bug (couldn't focus on current workspace)
darcs-hash:20070325203702-b9aa7-ed927b7df5270a9dfaebbbf0105bb8f6f4b3402e.gz
Diffstat (limited to '')
-rw-r--r--Main.hs31
1 files changed, 15 insertions, 16 deletions
diff --git a/Main.hs b/Main.hs
index 3e5b865..cd906cd 100644
--- a/Main.hs
+++ b/Main.hs
@@ -402,22 +402,21 @@ view o = do
ws <- gets workspace
ws2sc <- gets wsOnScreen
let m = W.current ws
- when (n /= m) $ do
- -- is the workspace we want to switch to currently visible?
- if M.member n ws2sc
- then windows $ W.view n
- else do
- sc <- case M.lookup m ws2sc of
- Nothing -> do
- trace "Current workspace isn't visible! This should never happen!"
- -- we don't know what screen to use, just use the first one.
- return 0
- Just sc -> return sc
- modify $ \s -> s { wsOnScreen = M.insert n sc (M.filter (/=sc) ws2sc) }
- gets wsOnScreen >>= trace . show
- windows $ W.view n
- mapM_ hide (W.index m ws)
- setTopFocus
+ -- is the workspace we want to switch to currently visible?
+ if M.member n ws2sc
+ then windows $ W.view n
+ else do
+ sc <- case M.lookup m ws2sc of
+ Nothing -> do
+ trace "Current workspace isn't visible! This should never happen!"
+ -- we don't know what screen to use, just use the first one.
+ return 0
+ Just sc -> return sc
+ modify $ \s -> s { wsOnScreen = M.insert n sc (M.filter (/=sc) ws2sc) }
+ gets wsOnScreen >>= trace . show
+ windows $ W.view n
+ mapM_ hide (W.index m ws)
+ setTopFocus
where n = o-1
-- | True if window is under management by us