From 8222c6041d2e2ed5258aa0f9188d2011a17285c9 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Sun, 21 Aug 2011 21:39:26 +0200 Subject: Add a lot of caching framework --- lib/Phi/Widgets/Taskbar.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/Phi/Widgets/Taskbar.hs') diff --git a/lib/Phi/Widgets/Taskbar.hs b/lib/Phi/Widgets/Taskbar.hs index fbf7da8..4c4b9c2 100644 --- a/lib/Phi/Widgets/Taskbar.hs +++ b/lib/Phi/Widgets/Taskbar.hs @@ -172,7 +172,8 @@ instance Widget Taskbar TaskbarState () where forkIO $ taskbarRunner phi' dispvar return $ TaskbarState 0 0 (-1) [] M.empty M.empty M.empty M.empty - + + initCache _ = () minSize _ _ _ _ = 0 weight _ = 1 @@ -205,7 +206,7 @@ instance Widget Taskbar TaskbarState () where desktopsWidth = sum $ map dwidth desktopNumbers windowWidth = if windowCount == 0 then 0 else min (taskMaxSize config) ((w - desktopsWidth) `div` windowCount) - surface <- createImageSurface FormatARGB32 w h + surface <- liftIO $ createImageSurface FormatARGB32 w h renderWith surface $ do setOperator OperatorClear paint -- cgit v1.2.3