diff options
author | Don Stewart <dons@cse.unsw.edu.au> | 2007-05-28 06:47:22 +0200 |
---|---|---|
committer | Don Stewart <dons@cse.unsw.edu.au> | 2007-05-28 06:47:22 +0200 |
commit | ea25401cbc801fa1500ecdb88f821756e0606521 (patch) | |
tree | 7f67e13dab9e01c59b64b8da7b1dfb7c57636663 /Operations.hs | |
parent | 0df39c14641e3508940f2cb2008417678156e8ce (diff) | |
download | metatile-ea25401cbc801fa1500ecdb88f821756e0606521.tar metatile-ea25401cbc801fa1500ecdb88f821756e0606521.zip |
apply gap to each screen
darcs-hash:20070528044722-9c5c1-7f8faeac3a2a375f58c94c822f16dc8e3beaea38
Diffstat (limited to 'Operations.hs')
-rw-r--r-- | Operations.hs | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/Operations.hs b/Operations.hs index c3a63cd..547c44b 100644 --- a/Operations.hs +++ b/Operations.hs @@ -141,16 +141,14 @@ refresh = do let n = W.tag (W.workspace w) this = W.view n ws Just l = fmap fst $ M.lookup n fls - r@(Rectangle sx sy sw sh) = genericIndex xinesc (W.screen w) - (gt,gb,gl,gr) = genericIndex gaps (W.screen w) - - -- now tile the windows on this workspace, and set gap maybe on current - rs <- doLayout l (if w == W.current ws - then Rectangle (sx + fromIntegral gl) - (sy + fromIntegral gt) - (sw - fromIntegral (gl + gr)) - (sh - fromIntegral (gt + gb)) - else r) (W.index this) + (Rectangle sx sy sw sh) = genericIndex xinesc (W.screen w) + (gt,gb,gl,gr) = genericIndex gaps (W.screen w) + + -- now tile the windows on this workspace, modified by the gap + rs <- doLayout l (Rectangle (sx + fromIntegral gl) + (sy + fromIntegral gt) + (sw - fromIntegral (gl + gr)) + (sh - fromIntegral (gt + gb))) (W.index this) mapM_ (\(win,rect) -> io (tileWindow d win rect)) rs -- and raise the focused window if there is one. |