aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Creighton <jcreigh@gmail.com>2007-03-19 04:54:50 +0100
committerJason Creighton <jcreigh@gmail.com>2007-03-19 04:54:50 +0100
commitcf2e92b9fd3ffbfa1bc81031b8308074a58f09be (patch)
tree9eed003afdc2d296e2a185d5ca6a03568e8a17ae
parent2b5a053aeb04258a590943bf4b909dc1114fc284 (diff)
downloadxmonad-cf2e92b9fd3ffbfa1bc81031b8308074a58f09be.tar.gz
xmonad-cf2e92b9fd3ffbfa1bc81031b8308074a58f09be.tar.xz
xmonad-cf2e92b9fd3ffbfa1bc81031b8308074a58f09be.zip
don't try to change the current workspace based on an enterNotify event
darcs-hash:20070319035450-b9aa7-d3541941daa816d0599dfa19e18718fa1c99e9b1.gz
-rw-r--r--Main.hs9
1 files changed, 4 insertions, 5 deletions
diff --git a/Main.hs b/Main.hs
index d81d952..345e3f8 100644
--- a/Main.hs
+++ b/Main.hs
@@ -181,11 +181,10 @@ handle e@(MappingNotifyEvent {window = w}) = do
handle e@(CrossingEvent {window = w, event_type = t})
| t == enterNotify && mode e == notifyNormal && detail e /= notifyInferior
= do ws <- gets workspace
- case W.lookup w ws of
- Just n -> do setFocus w
- windows $ W.view n
- Nothing -> do b <- isRoot w
- when b setTopFocus
+ if W.member w ws
+ then setFocus w
+ else do b <- isRoot w
+ when b setTopFocus
-- left a window, check if we need to focus root
handle e@(CrossingEvent {event_type = t})