Add a short delay waiting for messages before starting rendering
This commit is contained in:
parent
6746d60e3f
commit
aadf8d9780
1 changed files with 7 additions and 5 deletions
|
@ -143,11 +143,13 @@ runPhi xconfig config widget = do
|
|||
|
||||
forever $ do
|
||||
available <- messageAvailable phi
|
||||
unless available $ do
|
||||
repaint <- gets phiRepaint
|
||||
when repaint $ do
|
||||
updatePanels conn xcb
|
||||
modify $ \state -> state {phiRepaint = False}
|
||||
repaint <- gets phiRepaint
|
||||
when (not available && repaint) $ liftIO $ threadDelay 30000
|
||||
|
||||
available <- messageAvailable phi
|
||||
when (not available && repaint) $ do
|
||||
updatePanels conn xcb
|
||||
modify $ \state -> state {phiRepaint = False}
|
||||
|
||||
message <- receiveMessage phi
|
||||
handleMessage conn xcb message
|
||||
|
|
Reference in a new issue