From f4f0f537620208cddb90eb3f72efd15f7d9b6768 Mon Sep 17 00:00:00 2001 From: David Roundy Date: Tue, 12 Jun 2007 17:05:55 +0200 Subject: make focus, up and down complete functions. This is a rerun of my change to make (Stack a) never be empty. Gives us more type-safety. darcs-hash:20070612150555-72aca-5f6e43aa33979c71679a73b44d93f9e2b8f9d2a8.gz --- Operations.hs | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'Operations.hs') diff --git a/Operations.hs b/Operations.hs index 994b773..e03c0fd 100644 --- a/Operations.hs +++ b/Operations.hs @@ -134,7 +134,7 @@ windows f = do -- and must be called on all visible workspaces. broadcastMessage UnDoLayout XState { windowset = old, layouts = fls, xineScreens = xinesc, statusGaps = gaps } <- get - let oldvisible = concatMap (W.integrate . W.stack . W.workspace) $ W.current old : W.visible old + let oldvisible = concatMap (W.integrate' . W.stack . W.workspace) $ W.current old : W.visible old ws = f old modify (\s -> s { windowset = ws }) d <- asks display @@ -145,8 +145,7 @@ windows f = do this = W.view n ws Just l = fmap fst $ M.lookup n fls flt = filter (flip M.member (W.floating ws)) (W.index this) - tiled = W.filter (not . flip M.member (W.floating ws)) - . W.stack . W.workspace . W.current $ this + tiled = W.filter (not . flip M.member (W.floating ws)) . W.stack . W.workspace . W.current $ this (Rectangle sx sy sw sh) = genericIndex xinesc (W.screen w) (gt,gb,gl,gr) = genericIndex gaps (W.screen w) viewrect = Rectangle (sx + fromIntegral gl) (sy + fromIntegral gt) @@ -154,7 +153,7 @@ windows f = do -- just the tiled windows: -- now tile the windows on this workspace, modified by the gap - rs <- doLayout l viewrect tiled -- `mplus` doLayout full viewrect tiled + rs <- runLayout l viewrect tiled -- `mplus` doLayout full viewrect tiled mapM_ (uncurry tileWindow) rs -- now the floating windows: @@ -388,9 +387,7 @@ instance Message IncMasterN -- simple fullscreen mode, just render all windows fullscreen. -- a plea for tuple sections: map . (,sc) full :: Layout -full = Layout { doLayout = \sc ws -> return $ case ws of - W.Empty -> [] - (W.Node f _ _) -> [(f, sc)] +full = Layout { doLayout = \sc (W.Stack f _ _) -> return [(f, sc)] , modifyLayout = const (return Nothing) } -- no changes -- -- cgit v1.2.3