From ad8aa805d3837062e91fc8f5391c07f228c5bb33 Mon Sep 17 00:00:00 2001 From: Andrea Rossato Date: Sat, 29 Sep 2007 00:31:36 +0200 Subject: Tabbed: fixed a bug: when only one window is in the stack doLayout must still return a Tabbed (I Nothing) TConf darcs-hash:20070928223136-32816-33bbcf0b5cf72e47b278c4656f54ac6f8f528fea.gz --- Tabbed.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Tabbed.hs') diff --git a/Tabbed.hs b/Tabbed.hs index d2a0e1e..244825e 100644 --- a/Tabbed.hs +++ b/Tabbed.hs @@ -108,15 +108,15 @@ instance Read FontStruct where readsPrec _ _ = [] doLay :: Invisible Maybe TabState -> TConf -> Rectangle -> W.Stack Window -> X ([(Window, Rectangle)], Maybe (Tabbed Window)) -doLay mst _ sc (W.Stack w [] []) = do +doLay mst c sc (W.Stack w [] []) = do whenIJust mst $ \st -> destroyTabs (map fst $ tabsWindows st) - return ([(w,sc)], Nothing) + return ([(w,sc)], Just $ Tabbed (I Nothing) c) doLay mst conf sc@(Rectangle _ _ wid _) s@(W.Stack w _ _) = do let ws = W.integrate s width = wid `div` fromIntegral (length ws) -- initialize state st <- case mst of - (I Nothing) -> initState conf sc ws + (I Nothing ) -> initState conf sc ws (I (Just ts)) -> if map snd (tabsWindows ts) == ws && scr ts == sc then return ts else do destroyTabs (map fst $ tabsWindows ts) -- cgit v1.2.3