From ac9ed21ed01867c61aa2fc5c8253bf877d4b55de Mon Sep 17 00:00:00 2001 From: Stefan O'Rear Date: Mon, 4 Jun 2007 06:47:15 +0200 Subject: Remove no-longer-needed 'dimensions' state (-5 loc) darcs-hash:20070604044715-e3110-7bd7ba2b78f80046e2148fb37aa0f5fe3eca08c6.gz --- Main.hs | 4 +--- Operations.hs | 7 +------ XMonad.hs | 1 - 3 files changed, 2 insertions(+), 10 deletions(-) diff --git a/Main.hs b/Main.hs index 38ac301..490da13 100644 --- a/Main.hs +++ b/Main.hs @@ -59,9 +59,7 @@ main = do { windowset = winset , 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), - fromIntegral (displayHeight dpy dflt)) } + , xineScreens = xinesc } xSetErrorHandler -- in C, I'm too lazy to write the binding: dons diff --git a/Operations.hs b/Operations.hs index 79ccbcc..f419edf 100644 --- a/Operations.hs +++ b/Operations.hs @@ -235,12 +235,7 @@ rescreen :: X () rescreen = do xinesc <- withDisplay (io . getScreenInfo) - -- TODO: This stuff is necessary because Xlib apparently caches screen - -- width/height. Find a better solution later. I hate Xlib. - 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 , statusGaps = take (length xinesc) $ (statusGaps s) ++ repeat (0,0,0,0) }) windows $ \ws@(W.StackSet { W.current = v, W.visible = vs, W.hidden = hs }) -> diff --git a/XMonad.hs b/XMonad.hs index 7fafa7c..8cf9b95 100644 --- a/XMonad.hs +++ b/XMonad.hs @@ -40,7 +40,6 @@ import qualified Data.Map as M data XState = XState { windowset :: !WindowSet -- ^ workspace list , xineScreens :: ![Rectangle] -- ^ dimensions of each screen - , dimensions :: !(Position,Position) -- ^ dimensions of the screen, , statusGaps :: ![(Int,Int,Int,Int)] -- ^ width of status bar on each screen , layouts :: !(M.Map WorkspaceId (Layout, [Layout])) } -- ^ mapping of workspaces to descriptions of their layouts -- cgit v1.2.3