diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2013-09-11 20:22:45 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2013-09-11 20:22:45 +0200 |
commit | f05f53f9057508ff274f5ee51b866e68fb09824a (patch) | |
tree | 3e612f42c7e79684660e4846153057bffbd44a92 /MetaTile/Operations.hs | |
parent | 78b64d1d34f4764fd6ddb9a9d59a25cd72793b94 (diff) | |
download | metatile-f05f53f9057508ff274f5ee51b866e68fb09824a.tar metatile-f05f53f9057508ff274f5ee51b866e68fb09824a.zip |
Set border width after running the layout
Diffstat (limited to 'MetaTile/Operations.hs')
-rw-r--r-- | MetaTile/Operations.hs | 9 |
1 files changed, 5 insertions, 4 deletions
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) -- --------------------------------------------------------------------- |