aboutsummaryrefslogtreecommitdiffstats
path: root/XMonad/Actions
diff options
context:
space:
mode:
authorMalebria <malebria@riseup.net>2008-05-27 00:32:20 +0200
committerMalebria <malebria@riseup.net>2008-05-27 00:32:20 +0200
commit1253e611f75763796affa3e16e199d8a5a7f33b6 (patch)
tree2a40258272570b31cfa08992ae3afd54ff2eb376 /XMonad/Actions
parent59aa24736c4eb893d80a51ef29aa9de986249608 (diff)
downloadXMonadContrib-1253e611f75763796affa3e16e199d8a5a7f33b6.tar.gz
XMonadContrib-1253e611f75763796affa3e16e199d8a5a7f33b6.tar.xz
XMonadContrib-1253e611f75763796affa3e16e199d8a5a7f33b6.zip
Bug correction when areasColumn > 1
darcs-hash:20080526223220-1ef02-534dcd578c67a108f176c892a87a732ba6ab1dab.gz
Diffstat (limited to 'XMonad/Actions')
-rw-r--r--XMonad/Actions/Plane.hs16
1 files changed, 12 insertions, 4 deletions
diff --git a/XMonad/Actions/Plane.hs b/XMonad/Actions/Plane.hs
index 92593c5..639368a 100644
--- a/XMonad/Actions/Plane.hs
+++ b/XMonad/Actions/Plane.hs
@@ -112,10 +112,18 @@ plane function columns limits direction = do
state <- get
xconf <- ask
let vertical f =
- if mod currentWS columns >= mod areas columns
- then mod (f currentWS columns) $ div areas columns * columns
- else mod (f currentWS columns) $ ((div areas columns + 1) * columns)
- horizontal f = mod (f currentWS) columns + line * columns
+ if column >= areasColumn
+ then mod (f currentWS columns) $ areasLine * columns
+ else mod (f currentWS columns) $ (areasLine + 1) * columns
+
+ horizontal f =
+ if line < areasLine
+ then mod (f column) columns + lineNumber
+ else mod (f column) areasColumn + lineNumber
+
+ areasLine = div areas columns
+ areasColumn = mod areas columns
+ lineNumber = line * columns
line = div currentWS columns
column = mod currentWS columns
currentWS = fromJust mCurrentWS