From b4f358f9339d77b83a0faceb7892f27f49382e4b Mon Sep 17 00:00:00 2001 From: Don Stewart Date: Thu, 5 Apr 2007 02:01:00 +0200 Subject: -Wall police darcs-hash:20070405000100-9c5c1-aab51f7bfb20248e9a601b7af5107591db48af8c --- Operations.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Operations.hs') diff --git a/Operations.hs b/Operations.hs index 994843b..41a4616 100644 --- a/Operations.hs +++ b/Operations.hs @@ -44,7 +44,7 @@ refresh = do tile :: Rational -> Rectangle -> [Window] -> [(Window, Rectangle)] tile _ _ [] = [] tile _ d [w] = [(w, d)] -tile r (Rectangle sx sy sw sh) (w:s) +tile r (Rectangle sx sy sw sh) (w:s) = (w, Rectangle sx sy (fromIntegral lw) sh) : zipWith f [sy, sy + rh ..] s where lw = floor $ fromIntegral sw * r @@ -57,8 +57,8 @@ vtile :: Rational -> Rectangle -> [Window] -> [(Window, Rectangle)] vtile r rect ws = map (\(w, wr) -> (w, flipRect wr)) $ tile r (flipRect rect) ws flipRect :: Rectangle -> Rectangle -flipRect (Rectangle { rect_x = x, rect_y = y, rect_width = w, rect_height = h }) - = Rectangle { rect_x = y, rect_y = x, rect_width = h, rect_height = w } +flipRect (Rectangle { rect_x = rx, rect_y = ry, rect_width = rw, rect_height = rh }) + = Rectangle { rect_x = ry, rect_y = rx, rect_width = rh, rect_height = rw } -- | switchLayout. Switch to another layout scheme. Switches the -- current workspace. -- cgit v1.2.3