From 29e342c4985744cc2538d85cdbb248e6dd5f5ff8 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Wed, 11 Sep 2013 21:48:00 +0200 Subject: Let the layout decide about the border width --- MetaTile/Operations.hs | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'MetaTile/Operations.hs') diff --git a/MetaTile/Operations.hs b/MetaTile/Operations.hs index 5b3a598..db2e264 100644 --- a/MetaTile/Operations.hs +++ b/MetaTile/Operations.hs @@ -92,7 +92,7 @@ windows f = do let oldvisible = concatMap (W.integrate' . W.stack . W.screenWorkspace) $ W.screens old newwindows = W.allWindows ws \\ W.allWindows old ws = f old - XConf { display = d , normalBorder = nbc, focusedBorder = fbc, config = XConfig { defaultBorderWidth = bw } } <- ask + XConf { display = d, normalBorder = nbc, focusedBorder = fbc } <- ask mapM_ setInitialProperties newwindows @@ -117,17 +117,17 @@ windows f = do -- just the tiled windows: -- now tile the windows on this workspace, modified by the gap - (rs, ml') <- runLayout wsp { W.stack = tiled } viewrect `catchX` - runLayout wsp { W.stack = tiled, W.layout = Layout Full } viewrect + (rs, ml') <- runBorderLayout wsp { W.stack = tiled } viewrect `catchX` + runBorderLayout wsp { W.stack = tiled, W.layout = Layout Full } viewrect updateLayout n ml' - io $ restackWindows d (map fst rs) + io $ restackWindows d (map fst3 rs) -- return the visible windows for this workspace: return rs - let visible = map fst rects + let visible = map fst3 rects - mapM_ (\(w, r) -> tileWindow w r bw) rects + mapM_ (uncurry3 tileWindow) rects whenJust (W.peek ws) $ \w -> setFrameBackground d w fbc @@ -147,6 +147,12 @@ windows f = do unless isMouseFocused $ clearEvents enterWindowMask asks (logHook . config) >>= userCodeDef () where + fst3 :: (a, b, c) -> a + fst3 (a, _, _) = a + + uncurry3 :: (a -> b -> c -> d) -> (a, b, c) -> d + uncurry3 x (a, b, c) = x a b c + setFrameBackground :: Display -> Window -> Pixel -> X () setFrameBackground d w p = do frame <- getsWindowState wsFrame w -- cgit v1.2.3