From c4a9749143bb68e4b7b493dd5a01e5b62183f870 Mon Sep 17 00:00:00 2001 From: "Ivan.Miljenovic" Date: Thu, 24 Apr 2008 08:31:35 +0200 Subject: Error fix for Tabbed when tabbar always shown darcs-hash:20080424063135-97e08-e8d379301a745938308c89fcea7f1b2448125e36.gz --- XMonad/Layout/Tabbed.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'XMonad/Layout/Tabbed.hs') diff --git a/XMonad/Layout/Tabbed.hs b/XMonad/Layout/Tabbed.hs index ea02519..0e0a5c6 100644 --- a/XMonad/Layout/Tabbed.hs +++ b/XMonad/Layout/Tabbed.hs @@ -153,7 +153,7 @@ instance Eq a => DecorationStyle TabbedDecoration a where describeDeco (Tabbed Bottom _ ) = "Tabbed Bottom" decorationMouseDragHook _ _ _ = return () pureDecoration (Tabbed lc sh) _ ht _ s wrs (w,r@(Rectangle x y wh hh)) - = if ((sh == Always) || length ws > 1) + = if ((sh == Always && numWindows > 0) || numWindows > 1) then Just $ case lc of Top -> upperTab Bottom -> lowerTab @@ -164,6 +164,7 @@ instance Eq a => DecorationStyle TabbedDecoration a where nx = maybe x loc $ w `elemIndex` ws upperTab = Rectangle nx y wid (fi ht) lowerTab = Rectangle nx (y+fi(hh-ht)) wid (fi ht) + numWindows = length ws shrink (Tabbed loc _ ) (Rectangle _ _ _ dh) (Rectangle x y w h) = case loc of Top -> Rectangle x (y + fi dh) w (h - dh) -- cgit v1.2.3