diff options
author | Andrea Rossato <andrea.rossato@unibz.it> | 2007-09-29 00:31:36 +0200 |
---|---|---|
committer | Andrea Rossato <andrea.rossato@unibz.it> | 2007-09-29 00:31:36 +0200 |
commit | ad8aa805d3837062e91fc8f5391c07f228c5bb33 (patch) | |
tree | 5720dc69647cd1806bffc8e4430b6e5c56ba428e | |
parent | 1efc8d4cf8bd16498607693c6f9589f11c1c97d3 (diff) | |
download | XMonadContrib-ad8aa805d3837062e91fc8f5391c07f228c5bb33.tar.gz XMonadContrib-ad8aa805d3837062e91fc8f5391c07f228c5bb33.tar.xz XMonadContrib-ad8aa805d3837062e91fc8f5391c07f228c5bb33.zip |
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
-rw-r--r-- | Tabbed.hs | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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) |