summaryrefslogtreecommitdiffhomepage
path: root/src/Xmobar/X11/XlibDraw.hs
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2022-09-11 09:25:40 +0100
committerjao <jao@gnu.org>2022-09-11 09:25:40 +0100
commitd7299a0b80f0b15f820a1b7533549e306755441c (patch)
treed4c671e703ea87897f7da5ac921b31eb632a159a /src/Xmobar/X11/XlibDraw.hs
parentd579c840a5038d45c4fecde84dc99d6b14677e20 (diff)
downloadxmobar-d7299a0b80f0b15f820a1b7533549e306755441c.tar.gz
xmobar-d7299a0b80f0b15f820a1b7533549e306755441c.tar.bz2
cairo: bitmaps
Diffstat (limited to 'src/Xmobar/X11/XlibDraw.hs')
-rw-r--r--src/Xmobar/X11/XlibDraw.hs12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/Xmobar/X11/XlibDraw.hs b/src/Xmobar/X11/XlibDraw.hs
index 9483c16..77de23b 100644
--- a/src/Xmobar/X11/XlibDraw.hs
+++ b/src/Xmobar/X11/XlibDraw.hs
@@ -262,9 +262,9 @@ drawBoxBorder
_ -> error "unreachable code"
-updateActions :: XConf -> Rectangle -> [[Segment]]
- -> IO [([Action], Position, Position)]
-updateActions conf (Rectangle _ _ wid _) ~[left,center,right] = do
+updateActions :: Rectangle -> [[Segment]] -> X [([Action], Position, Position)]
+updateActions (Rectangle _ _ wid _) ~[left,center,right] = do
+ conf <- ask
let d = display conf
fs = fontListS conf
strLn :: [Segment] -> IO [(Maybe [Action], Position, Position)]
@@ -286,6 +286,6 @@ updateActions conf (Rectangle _ _ wid _) ~[left,center,right] = do
C -> (remWidth xs + offs) `div` 2
R -> remWidth xs
L -> offs
- fmap concat $ mapM (\(a,xs) ->
- (\xs' -> partCoord (offset a xs') xs') <$> strLn xs) $
- zip [L,C,R] [left,center,right]
+ liftIO $ fmap concat $ mapM (\(a,xs) ->
+ (\xs' -> partCoord (offset a xs') xs') <$> strLn xs) $
+ zip [L,C,R] [left,center,right]