aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Roundy <droundy@darcs.net>2008-03-26 16:10:04 +0100
committerDavid Roundy <droundy@darcs.net>2008-03-26 16:10:04 +0100
commit6fe913b76c6ea706e243cd535136a67107396ce4 (patch)
tree88ef8ae4066bca1ba4e237fa52dd922c9f0794e2
parent1d81bb032c0e03e156fbf9c583ed76f9daba6d18 (diff)
downloadXMonadContrib-6fe913b76c6ea706e243cd535136a67107396ce4.tar.gz
XMonadContrib-6fe913b76c6ea706e243cd535136a67107396ce4.tar.xz
XMonadContrib-6fe913b76c6ea706e243cd535136a67107396ce4.zip
cleanup in Tabbed (make 'loc' be actual location).
darcs-hash:20080326151004-72aca-542f1e9b16ff7f3c57f99b09865acad48fd972d8.gz
-rw-r--r--XMonad/Layout/Tabbed.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/XMonad/Layout/Tabbed.hs b/XMonad/Layout/Tabbed.hs
index e1a45c8..a68674e 100644
--- a/XMonad/Layout/Tabbed.hs
+++ b/XMonad/Layout/Tabbed.hs
@@ -114,9 +114,9 @@ instance Eq a => DecorationStyle TabbedDecoration a where
Tabbed -> Rectangle nx y wid (fi ht)
TabbedBottom -> Rectangle nx (y+fi(hh-ht)) wid (fi ht)
where ws = filter (`elem` map fst (filter ((==r) . snd) wrs)) (S.integrate s)
- loc i = (wh * fi i) `div` max 1 (fi $ length ws)
- wid = maybe (fi x) (\i -> loc (i+1) - loc i) $ w `elemIndex` ws
- nx = (x +) $ maybe 0 (fi . loc) $ w `elemIndex` ws
+ loc i = x + fi ((wh * fi i) `div` max 1 (fi $ length ws))
+ wid = fi $ maybe x (\i -> loc (i+1) - loc i) $ w `elemIndex` ws
+ nx = maybe x loc $ w `elemIndex` ws
shrink ds (Rectangle _ _ _ dh) (Rectangle x y w h) = case ds of
Tabbed -> Rectangle x (y + fi dh) w (h - dh)
TabbedBottom -> Rectangle x y w (h - dh)