From f05f53f9057508ff274f5ee51b866e68fb09824a Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Wed, 11 Sep 2013 20:22:45 +0200 Subject: Set border width after running the layout --- MetaTile/Operations.hs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'MetaTile/Operations.hs') diff --git a/MetaTile/Operations.hs b/MetaTile/Operations.hs index 1a2fd11..5b3a598 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 } <- ask + XConf { display = d , normalBorder = nbc, focusedBorder = fbc, config = XConfig { defaultBorderWidth = bw } } <- ask mapM_ setInitialProperties newwindows @@ -127,7 +127,7 @@ windows f = do let visible = map fst rects - mapM_ (uncurry tileWindow) rects + mapM_ (\(w, r) -> tileWindow w r bw) rects whenJust (W.peek ws) $ \w -> setFrameBackground d w fbc @@ -239,12 +239,13 @@ clearEvents mask = withDisplay $ \d -> io $ do -- | tileWindow. Moves and resizes w such that it fits inside the given -- rectangle, including its border. -tileWindow :: Window -> Rectangle -> X () -tileWindow w r = withDisplay $ \d -> do +tileWindow :: Window -> Rectangle -> BorderWidth -> X () +tileWindow w r bw = withDisplay $ \d -> do -- give all windows at least 1x1 pixels let least x | x <= 0 = 1 | otherwise = x frame <- getsWindowState wsFrame w + modifyWindowState (\ws -> ws {wsBorderWidth = bw}) w io $ moveResizeWindow d frame (rect_x r) (rect_y r) (least $ rect_width r) (least $ rect_height r) -- --------------------------------------------------------------------- -- cgit v1.2.3