diff options
author | Norbert Zeh <nzeh@cs.dal.ca> | 2008-12-12 21:35:32 +0100 |
---|---|---|
committer | Norbert Zeh <nzeh@cs.dal.ca> | 2008-12-12 21:35:32 +0100 |
commit | 503a4f5977438a92ea2084685eaa02f2d66b9164 (patch) | |
tree | e22081ccf9a7057e95b684988dfc0e9b268932e3 | |
parent | 3dee7f3c12242f698b57c5c278b15869f6c4aef7 (diff) | |
download | XMonadContrib-503a4f5977438a92ea2084685eaa02f2d66b9164.tar.gz XMonadContrib-503a4f5977438a92ea2084685eaa02f2d66b9164.tar.xz XMonadContrib-503a4f5977438a92ea2084685eaa02f2d66b9164.zip |
fix focus issue for XMonad.Actions.Warp.banishScreen
This patch ensures that the focus (or in fact the whose windowset)
does not change as a result of a banishScreen. The way this is implemented
will become problematic if xmonad ever goes multithreaded.
darcs-hash:20081212203532-18a2b-34ebdf2ce7f1bb64f70e42a856342654c4fe3690.gz
-rw-r--r-- | XMonad/Actions/Warp.hs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/XMonad/Actions/Warp.hs b/XMonad/Actions/Warp.hs index 7536a1c..863d0f6 100644 --- a/XMonad/Actions/Warp.hs +++ b/XMonad/Actions/Warp.hs @@ -77,8 +77,10 @@ banishScreen direction = case direction of UpperRight -> warpToCurrentScreen 1 0 where warpToCurrentScreen h v = - do (StackSet { current = x }) <- gets windowset - warpToScreen (W.screen x) h v + do ws <- gets windowset + warpToScreen (W.screen $ current ws) h v + windows (const ws) + fraction :: (Integral a, Integral b) => Rational -> a -> b fraction f x = floor (f * fromIntegral x) |