From 69ea6c363b7889e48ddaa081d5e161d08ae9e6b7 Mon Sep 17 00:00:00 2001 From: David Roundy Date: Tue, 25 Mar 2008 22:03:27 +0100 Subject: fix bug in TabBarDecoration leading to gaps in corner. darcs-hash:20080325210327-72aca-41584f190a28f9967a71831699c233faa0800799.gz --- XMonad/Layout/TabBarDecoration.hs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'XMonad/Layout/TabBarDecoration.hs') 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 -- cgit v1.2.3