Add a short delay waiting for messages before starting rendering

This commit is contained in:
Matthias Schiffer 2011-09-07 22:33:07 +02:00
parent 6746d60e3f
commit aadf8d9780

View file

@ -143,9 +143,11 @@ runPhi xconfig config widget = do
forever $ do forever $ do
available <- messageAvailable phi available <- messageAvailable phi
unless available $ do
repaint <- gets phiRepaint repaint <- gets phiRepaint
when repaint $ do when (not available && repaint) $ liftIO $ threadDelay 30000
available <- messageAvailable phi
when (not available && repaint) $ do
updatePanels conn xcb updatePanels conn xcb
modify $ \state -> state {phiRepaint = False} modify $ \state -> state {phiRepaint = False}