aboutsummaryrefslogtreecommitdiffstats
path: root/XMonad/Layout
diff options
context:
space:
mode:
authorDavid Roundy <droundy@darcs.net>2008-03-25 22:03:27 +0100
committerDavid Roundy <droundy@darcs.net>2008-03-25 22:03:27 +0100
commit69ea6c363b7889e48ddaa081d5e161d08ae9e6b7 (patch)
tree575266cddffe7e3d83f14d12949e6d587034990e /XMonad/Layout
parent4a5742b40b408262659e08ef2c57f0da4a9d52d5 (diff)
downloadXMonadContrib-69ea6c363b7889e48ddaa081d5e161d08ae9e6b7.tar.gz
XMonadContrib-69ea6c363b7889e48ddaa081d5e161d08ae9e6b7.tar.xz
XMonadContrib-69ea6c363b7889e48ddaa081d5e161d08ae9e6b7.zip
fix bug in TabBarDecoration leading to gaps in corner.
darcs-hash:20080325210327-72aca-41584f190a28f9967a71831699c233faa0800799.gz
Diffstat (limited to 'XMonad/Layout')
-rw-r--r--XMonad/Layout/TabBarDecoration.hs9
1 files changed, 4 insertions, 5 deletions
diff --git a/XMonad/Layout/TabBarDecoration.hs b/XMonad/Layout/TabBarDecoration.hs
index c681924..9339a64 100644
--- a/XMonad/Layout/TabBarDecoration.hs
+++ b/XMonad/Layout/TabBarDecoration.hs
@@ -68,12 +68,11 @@ instance Eq a => DecorationStyle TabBarDecoration a where
shrink _ _ r = r
decorationMouseDragHook _ _ _ = return ()
pureDecoration (TabBar p) _ dht (Rectangle x y wh ht) s _ (w,_) =
- if isInStack s w then Just $ Rectangle nx ny nwh (fi dht) else Nothing
+ if isInStack s w then Just $ Rectangle nx ny wid (fi dht) else Nothing
where wrs = S.integrate s
- nwh = wh `div` max 1 (fi $ length wrs)
+ loc i = (wh * fi i) `div` max 1 (fi $ length wrs)
+ wid = maybe (fi x) (\i -> loc (i+1) - loc i) $ w `elemIndex` wrs
ny = case p of
Top -> y
Bottom -> y + fi ht - fi dht
- nx = case w `elemIndex` wrs of
- Just i -> x + (fi nwh * fi i)
- Nothing -> x
+ nx = maybe x (fi . loc) $ w `elemIndex` wrs