From d7299a0b80f0b15f820a1b7533549e306755441c Mon Sep 17 00:00:00 2001 From: jao Date: Sun, 11 Sep 2022 09:25:40 +0100 Subject: cairo: bitmaps --- src/Xmobar/X11/Loop.hs | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'src/Xmobar/X11/Loop.hs') diff --git a/src/Xmobar/X11/Loop.hs b/src/Xmobar/X11/Loop.hs index c6a4e97..8f74b79 100644 --- a/src/Xmobar/X11/Loop.hs +++ b/src/Xmobar/X11/Loop.hs @@ -112,6 +112,7 @@ x11EventLoop w signal = _ -> return () -- | Continuously wait for a signal from a thread or an interrupt handler +-- The list of actions provide also the positions of clickable rectangles signalLoop :: XConf -> [([Action], Position, Position)] -> TMVar SignalType @@ -121,14 +122,10 @@ signalLoop xc@(XConf d r w fs vos is cfg) as signal tv = do typ <- atomically $ takeTMVar signal case typ of Wakeup -> do - str <- updateSegments cfg tv - xc' <- updateCache d w is (iconRoot cfg) str >>= + segs <- updateSegments cfg tv + xc' <- updateCache d w is (iconRoot cfg) segs >>= \c -> return xc { iconS = c } -#ifdef CAIRO - as' <- runX xc' $ drawInWin r str -#else - as' <- runX xc' $ drawInWin xc r str -#endif + as' <- runX xc' $ drawInWin segs signalLoop xc' as' signal tv Reposition -> -- cgit v1.2.3