aboutsummaryrefslogtreecommitdiffstats
path: root/Tabbed.hs
diff options
context:
space:
mode:
authorJason Creighton <jcreigh@gmail.com>2007-06-11 01:15:10 +0200
committerJason Creighton <jcreigh@gmail.com>2007-06-11 01:15:10 +0200
commit252d55826ac2ddcf879d8cbf8a5af2d63b043fef (patch)
tree524e9d7d7118337cd0a1ed93193da3c51e4d6aa8 /Tabbed.hs
parentbe0ad5c432ec62bcd862d8a7ad7b8d857055b853 (diff)
downloadXMonadContrib-252d55826ac2ddcf879d8cbf8a5af2d63b043fef.tar.gz
XMonadContrib-252d55826ac2ddcf879d8cbf8a5af2d63b043fef.tar.xz
XMonadContrib-252d55826ac2ddcf879d8cbf8a5af2d63b043fef.zip
make Tabbed respect the y position of the layout rect (statusbar bugfix)
darcs-hash:20070610231510-b9aa7-c3b9ee2c2ead8d21e2fe36343575706424617171.gz
Diffstat (limited to 'Tabbed.hs')
-rw-r--r--Tabbed.hs12
1 files changed, 6 insertions, 6 deletions
diff --git a/Tabbed.hs b/Tabbed.hs
index d97e77c..6eaa754 100644
--- a/Tabbed.hs
+++ b/Tabbed.hs
@@ -26,8 +26,8 @@ tabbed = Layout { doLayout = dolay, modifyLayout = const (return Nothing) }
dolay :: Rectangle -> [Window] -> X [(Window, Rectangle)]
dolay sc [w] = return [(w,sc)]
-dolay sc@(Rectangle x _ wid _) ws =
- do let ts = gentabs x wid (length ws)
+dolay sc@(Rectangle x y wid _) ws =
+ do let ts = gentabs x y wid (length ws)
tws = zip ts ws
maketab (t,w) = newDecoration t 1 0x000000 0x777777 (drawtab t w) (focus w)
drawtab r@(Rectangle _ _ wt ht) w d w' gc =
@@ -54,10 +54,10 @@ dolay sc@(Rectangle x _ wid _) ws =
shrink :: Rectangle -> Rectangle
shrink (Rectangle x y w h) = Rectangle x (y+tabsize) w (h-tabsize)
-gentabs :: Position -> Dimension -> Int -> [Rectangle]
-gentabs _ _ 0 = []
-gentabs x1 w num = Rectangle x1 0 (wid - 2) (tabsize - 2)
- : gentabs (x1 + fromIntegral wid) (w - wid) (num - 1)
+gentabs :: Position -> Position -> Dimension -> Int -> [Rectangle]
+gentabs _ _ _ 0 = []
+gentabs x y w num = Rectangle x y (wid - 2) (tabsize - 2)
+ : gentabs (x + fromIntegral wid) y (w - wid) (num - 1)
where wid = w `div` (fromIntegral num)
tabsize :: Integral a => a