From 3bf5609453485e8b20a75797994ff3b64d8c60ed Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Thu, 12 Sep 2013 21:08:13 +0200 Subject: Split up window and frame state --- MetaTile/Operations.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'MetaTile/Operations.hs') diff --git a/MetaTile/Operations.hs b/MetaTile/Operations.hs index db2e264..b45403f 100644 --- a/MetaTile/Operations.hs +++ b/MetaTile/Operations.hs @@ -190,7 +190,8 @@ hide w = whenX (getsWindowState wsMapped w) $ withDisplay $ \d -> do configureClientWindow :: Window -> X () configureClientWindow w = withDisplay $ \d -> do - (frame, bw) <- getsWindowState (wsFrame &&& wsBorderWidth) w + frame <- getsWindowState wsFrame w + Just bw <- getsFrameState fsBorderWidth frame (_, x, y, width, height, _, _) <- io $ getGeometry d frame let least1 n = max 1 n x' = x + (fi $ bwLeft bw) @@ -251,7 +252,7 @@ tileWindow w r bw = withDisplay $ \d -> do let least x | x <= 0 = 1 | otherwise = x frame <- getsWindowState wsFrame w - modifyWindowState (\ws -> ws {wsBorderWidth = bw}) w + modifyFrameState (\fs -> fs {fsBorderWidth = bw}) frame io $ moveResizeWindow d frame (rect_x r) (rect_y r) (least $ rect_width r) (least $ rect_height r) -- --------------------------------------------------------------------- -- cgit v1.2.3