summaryrefslogtreecommitdiffstats
path: root/lib/Phi/Widgets
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2011-08-12 02:11:09 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2011-08-12 02:11:09 +0200
commit180285af85c4c6c02c885dd6c276a33e0bf00d1a (patch)
treee94763647502151ee8034777680f5c991a625aaf /lib/Phi/Widgets
parent8dab9ed128f5a7f80917d1eb90eed902e1a333b6 (diff)
downloadphi-180285af85c4c6c02c885dd6c276a33e0bf00d1a.tar
phi-180285af85c4c6c02c885dd6c276a33e0bf00d1a.zip
Fix message bus memory leak
Diffstat (limited to 'lib/Phi/Widgets')
-rw-r--r--lib/Phi/Widgets/Systray.hs3
-rw-r--r--lib/Phi/Widgets/Taskbar.hs3
2 files changed, 4 insertions, 2 deletions
diff --git a/lib/Phi/Widgets/Systray.hs b/lib/Phi/Widgets/Systray.hs
index 60cfd76..b8b85d7 100644
--- a/lib/Phi/Widgets/Systray.hs
+++ b/lib/Phi/Widgets/Systray.hs
@@ -59,7 +59,8 @@ instance WidgetClass Systray where
type WidgetData Systray = SystrayState
initWidget (Systray) phi dispvar = do
- forkIO $ systrayRunner phi dispvar
+ phi' <- dupPhi phi
+ forkIO $ systrayRunner phi' dispvar
lastReset <- newIORef 0
return $ SystrayState phi (head . getScreens $ dispvar) 0 lastReset []
diff --git a/lib/Phi/Widgets/Taskbar.hs b/lib/Phi/Widgets/Taskbar.hs
index 24f6611..a5a6fdc 100644
--- a/lib/Phi/Widgets/Taskbar.hs
+++ b/lib/Phi/Widgets/Taskbar.hs
@@ -165,7 +165,8 @@ instance WidgetClass Taskbar where
type WidgetData Taskbar = TaskbarState
initWidget (Taskbar _) phi dispvar = do
- forkIO $ taskbarRunner phi dispvar
+ phi' <- dupPhi phi
+ forkIO $ taskbarRunner phi' dispvar
return $ TaskbarState 0 0 (-1) [] M.empty M.empty M.empty M.empty