summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDon Stewart <dons@cse.unsw.edu.au>2007-05-28 05:18:35 +0200
committerDon Stewart <dons@cse.unsw.edu.au>2007-05-28 05:18:35 +0200
commit658623830c8e3c2cdd4640afe0a23b6ed68544ed (patch)
tree8cd0ee799a1fe89a87aac771780afdc94f5b7763
parentc60ea349b9b5e9942e3e396fc78a2d4716226f70 (diff)
downloadmetatile-658623830c8e3c2cdd4640afe0a23b6ed68544ed.tar
metatile-658623830c8e3c2cdd4640afe0a23b6ed68544ed.zip
be sure to reset the gap list on rescreen
darcs-hash:20070528031835-9c5c1-34c9fc2931a6daa8fc3e63385782f43b097e293f
-rw-r--r--Main.hs2
-rw-r--r--Operations.hs5
2 files changed, 4 insertions, 3 deletions
diff --git a/Main.hs b/Main.hs
index 3969321..df768b7 100644
--- a/Main.hs
+++ b/Main.hs
@@ -63,7 +63,7 @@ main = do
, layouts = M.fromList [(w, safeLayouts) | w <- [0 .. W workspaces - 1]]
, statusGaps = take (length xinesc) $ defaultGaps ++ repeat (0,0,0,0)
, xineScreens = xinesc
- , dimensions = (fromIntegral (displayWidth dpy dflt),
+ , dimensions = (fromIntegral (displayWidth dpy dflt),
fromIntegral (displayHeight dpy dflt)) }
xSetErrorHandler -- in C, I'm too lazy to write the binding: dons
diff --git a/Operations.hs b/Operations.hs
index ed2ff9d..c3a63cd 100644
--- a/Operations.hs
+++ b/Operations.hs
@@ -179,7 +179,7 @@ tileWindow d w r = do
-- ---------------------------------------------------------------------
-- | rescreen. The screen configuration may have changed (due to
--- xrandr), update the state and refresh the screen.
+-- xrandr), update the state and refresh the screen, and reset the gap.
rescreen :: X ()
rescreen = do
xinesc <- withDisplay (io . getScreenInfo)
@@ -189,7 +189,8 @@ rescreen = do
let sx = maximum $ map (\r -> rect_x r + fromIntegral (rect_width r)) xinesc
sy = maximum $ map (\r -> rect_y r + fromIntegral (rect_height r)) xinesc
- modify (\s -> s { xineScreens = xinesc, dimensions = (sx, sy) })
+ modify (\s -> s { xineScreens = xinesc , dimensions = (sx, sy)
+ , statusGaps = take (length xinesc) $ (statusGaps s) ++ repeat (0,0,0,0) })
windows $ \ws@(W.StackSet { W.current = v, W.visible = vs, W.hidden = hs }) ->
let (x:xs, ys) = splitAt (length xinesc) $ map W.workspace (v:vs) ++ hs