From c4badad914279b420c071c6da69d768bcc49a964 Mon Sep 17 00:00:00 2001 From: Eric Mertens Date: Thu, 25 Oct 2007 02:17:50 +0200 Subject: TilePrime.hs: Handle nmaster darcs-hash:20071025001750-b49f3-043ff910253fd3de36bc286c90fc12553ae61e58.gz --- TilePrime.hs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'TilePrime.hs') 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) -- cgit v1.2.3