summaryrefslogtreecommitdiffhomepage
path: root/src/Xmobar/X11/XlibDraw.hs
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2022-09-11 18:54:34 +0100
committerjao <jao@gnu.org>2022-09-11 19:22:57 +0100
commit7b6542e6b13d5457509a3bf79e3ad3ad9a42e48e (patch)
tree136e52af523e4a6924705a92393ebabcc5b95363 /src/Xmobar/X11/XlibDraw.hs
parentd7299a0b80f0b15f820a1b7533549e306755441c (diff)
downloadxmobar-7b6542e6b13d5457509a3bf79e3ad3ad9a42e48e.tar.gz
xmobar-7b6542e6b13d5457509a3bf79e3ad3ad9a42e48e.tar.bz2
x event loop clean-ups
Diffstat (limited to 'src/Xmobar/X11/XlibDraw.hs')
-rw-r--r--src/Xmobar/X11/XlibDraw.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Xmobar/X11/XlibDraw.hs b/src/Xmobar/X11/XlibDraw.hs
index 77de23b..15a0ec7 100644
--- a/src/Xmobar/X11/XlibDraw.hs
+++ b/src/Xmobar/X11/XlibDraw.hs
@@ -56,7 +56,7 @@ drawInPixmap gc p wid ht ~[left,center,right] = do
fs = fontListS r
vs = verticalOffsets r
strLn = liftIO . mapM getWidth
- iconW i = maybe 0 B.width (lookup i $ iconS r)
+ iconW i = maybe 0 B.width (lookup i $ iconCache r)
getWidth (Text s,cl,i,_) =
textWidth d (safeIndex fs i) s >>= \tw -> return (Text s,cl,i,fi tw)
getWidth (Icon s,cl,i,_) = return (Icon s,cl,i,fi $ iconW s)
@@ -161,7 +161,7 @@ printStrings dr gc fontlist voffs offs a boxes sl@((s,c,i,l):xs) = do
(Text t) -> liftIO $ printString d dr fontst gc fc bc offset valign ay ht' t alph
(Icon p) -> liftIO $ maybe (return ())
(B.drawBitmap d dr gc fc bc offset valign)
- (lookup p (iconS r))
+ (lookup p (iconCache r))
(Hspace _) -> liftIO $ return ()
let triBoxes = tBoxes c
dropBoxes = filter (\(_,b) -> b `notElem` triBoxes) boxes
@@ -269,7 +269,7 @@ updateActions (Rectangle _ _ wid _) ~[left,center,right] = do
fs = fontListS conf
strLn :: [Segment] -> IO [(Maybe [Action], Position, Position)]
strLn = liftIO . mapM getCoords
- iconW i = maybe 0 B.width (lookup i $ iconS conf)
+ iconW i = maybe 0 B.width (lookup i $ iconCache conf)
getCoords (Text s,_,i,a) =
textWidth d (safeIndex fs i) s >>= \tw -> return (a, 0, fi tw)
getCoords (Icon s,_,_,a) = return (a, 0, fi $ iconW s)