the Stack can be Empty

This commit is contained in:
Andrea Rossato 2007-06-12 05:51:44 +00:00
parent 93ab005719
commit 1b0a012dd4

View File

@ -25,6 +25,7 @@ tabbed :: Layout
tabbed = Layout { doLayout = dolay, modifyLayout = const (return Nothing) } tabbed = Layout { doLayout = dolay, modifyLayout = const (return Nothing) }
dolay :: Rectangle -> W.Stack Window -> X [(Window, Rectangle)] dolay :: Rectangle -> W.Stack Window -> X [(Window, Rectangle)]
dolay _ W.Empty = return []
dolay sc (W.Node w [] []) = return [(w,sc)] dolay sc (W.Node w [] []) = return [(w,sc)]
dolay sc@(Rectangle x y wid _) s@(W.Node w _ _) = dolay sc@(Rectangle x y wid _) s@(W.Node w _ _) =
do let ws = W.integrate s do let ws = W.integrate s