summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDon Stewart <dons@cse.unsw.edu.au>2007-05-27 17:08:05 +0200
committerDon Stewart <dons@cse.unsw.edu.au>2007-05-27 17:08:05 +0200
commit659411687c04f6e07a39a92717ec6dc0895b9918 (patch)
tree88d093da471c321d8cf9bf31bd9d9448858eb302
parentd3fd8432032209ca581886cc225524b02474d14d (diff)
downloadmetatile-659411687c04f6e07a39a92717ec6dc0895b9918.tar
metatile-659411687c04f6e07a39a92717ec6dc0895b9918.zip
only set gap on current physical screen
darcs-hash:20070527150805-9c5c1-6774cc60f8f39b8ac16c465d7ab0d2884a984fc1
-rw-r--r--Operations.hs11
1 files changed, 7 insertions, 4 deletions
diff --git a/Operations.hs b/Operations.hs
index ef17095..741866a 100644
--- a/Operations.hs
+++ b/Operations.hs
@@ -137,10 +137,13 @@ refresh = do
let n = W.tag (W.workspace w)
this = W.view n ws
Just l = fmap fst $ M.lookup n fls
- Rectangle sx sy sw sh = genericIndex xinesc (W.screen w)
- -- now tile the windows on this workspace
- rs <- doLayout l (Rectangle sx (sy + fromIntegral gap)
- sw (sh - fromIntegral gap)) (W.index this)
+ r@(Rectangle sx sy sw sh) = genericIndex xinesc (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 (sy + fromIntegral gap)
+ sw (sh - fromIntegral gap)
+ else r) (W.index this)
mapM_ (\(win,rect) -> io (tileWindow d win rect)) rs
-- and raise the focused window if there is one.