summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2011-10-17 21:16:01 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2011-10-17 21:16:01 +0200
commit3e1ca8091269fcd30a7d89cbe2f9d68d7447b0fc (patch)
tree59e9e0ea07f945e53034203125f19dcf91a38956 /lib
parent33cd402ae968587d256e11004dac9ed52d1c3cc5 (diff)
downloadphi-3e1ca8091269fcd30a7d89cbe2f9d68d7447b0fc.tar
phi-3e1ca8091269fcd30a7d89cbe2f9d68d7447b0fc.zip
Renamed binaries to lowercaseHEADmaster
Diffstat (limited to 'lib')
-rw-r--r--lib/Phi/X11.hs10
-rw-r--r--lib/Phi/X11/AtomList.hs1
2 files changed, 9 insertions, 2 deletions
diff --git a/lib/Phi/X11.hs b/lib/Phi/X11.hs
index af4cb0b..7a673c3 100644
--- a/lib/Phi/X11.hs
+++ b/lib/Phi/X11.hs
@@ -167,12 +167,14 @@ runPhi xconfig config widget = do
forM_ panels $ liftIO . mapWindow conn . panelWindow
- liftIO $ forkIO $ receiveEvents phi conn
+ liftIO $ do
+ forkIO $ receiveEvents phi conn
+ forkIO $ receiveErrors phi conn
forever $ do
available <- messageAvailable phi
repaint <- gets phiRepaint
- when (not available && repaint) $ liftIO $ threadDelay 30000
+ when (not available && repaint) $ liftIO $ threadDelay 20000
available <- messageAvailable phi
when (not available && repaint) $ do
@@ -311,6 +313,10 @@ receiveEvents :: Phi -> Connection -> IO ()
receiveEvents phi conn =
forever $ receiveEvents' conn >>= sendMessages phi
+receiveErrors :: Phi -> Connection -> IO ()
+receiveErrors phi conn =
+ forever $ waitForError conn >>= putStrLn . ("XHB error: " ++) . show
+
updatePanels :: (Widget w s c X11) => PhiX w s c ()
updatePanels = do
X11 conn _ screen <- asks phiX11
diff --git a/lib/Phi/X11/AtomList.hs b/lib/Phi/X11/AtomList.hs
index cad753a..bc91efa 100644
--- a/lib/Phi/X11/AtomList.hs
+++ b/lib/Phi/X11/AtomList.hs
@@ -48,6 +48,7 @@ atoms = [ "ATOM"
, "_XEMBED"
, "_XROOTPMAP_ID"
, "_XROOTMAP_ID"
+ , "PHI_SYSTRAY_HELPER"
]
-- the expression must have the type (ConnectionClass c => c -> String)