summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Operations.hs3
1 files changed, 1 insertions, 2 deletions
diff --git a/Operations.hs b/Operations.hs
index 16a46f7..2b35895 100644
--- a/Operations.hs
+++ b/Operations.hs
@@ -160,8 +160,7 @@ tileWindow d w r = do
-- refresh the screen.
rescreen :: X ()
rescreen = do
- dpy <- asks display
- xinesc <- io $ getScreenInfo dpy
+ 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