aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Mertens <emertens@galois.com>2007-10-25 02:17:50 +0200
committerEric Mertens <emertens@galois.com>2007-10-25 02:17:50 +0200
commitc4badad914279b420c071c6da69d768bcc49a964 (patch)
treec79bc5b148847b2316ddde0f88ad6382028c9065
parentbb19e4935ecd3b9537c2a663a9637395aa5b5f9a (diff)
downloadXMonadContrib-c4badad914279b420c071c6da69d768bcc49a964.tar.gz
XMonadContrib-c4badad914279b420c071c6da69d768bcc49a964.tar.xz
XMonadContrib-c4badad914279b420c071c6da69d768bcc49a964.zip
TilePrime.hs: Handle nmaster
darcs-hash:20071025001750-b49f3-043ff910253fd3de36bc286c90fc12553ae61e58.gz
-rw-r--r--TilePrime.hs9
1 files changed, 5 insertions, 4 deletions
diff --git a/TilePrime.hs b/TilePrime.hs
index 60a35a5..c4e9f8c 100644
--- a/TilePrime.hs
+++ b/TilePrime.hs
@@ -64,11 +64,12 @@ instance LayoutClass TilePrime Window where
let xs = W.integrate s
hints <- withDisplay $ \ disp -> io (mapM (getWMNormalHints disp) xs)
let xs' = zip xs hints
- (leftRect, rightRect)
- | null (drop m xs) = (rect, Rectangle 0 0 0 0)
- | flp = splitVerticallyBy f rect
- | otherwise = splitHorizontallyBy f rect
(leftXs, rightXs) = splitAt m xs'
+ (leftRect, rightRect)
+ | null rightXs = (rect, Rectangle 0 0 0 0)
+ | null leftXs = (Rectangle 0 0 0 0, rect)
+ | flp = splitVerticallyBy f rect
+ | otherwise = splitHorizontallyBy f rect
masters = fillWindows leftRect leftXs
slaves = fillWindows rightRect rightXs
return (masters ++ slaves, Nothing)