mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-07 09:56:59 +00:00
Don't go to sleep if there are delayed painting messages
This commit is contained in:
parent
e0b246dd87
commit
53f2b4a121
@ -292,7 +292,10 @@ bool Manager::generateMessages()
|
||||
// Generate messages for timers
|
||||
Timer::pollTimers();
|
||||
|
||||
if (!msg_queue.empty())
|
||||
// Returns true if we have to dispatch messages (if the redraw was
|
||||
// delayed, we have to pump messages because there is where paint
|
||||
// messages are flushed)
|
||||
if (!msg_queue.empty() || redrawState != RedrawState::Normal)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
@ -340,6 +343,7 @@ void Manager::generateMessagesFromOSEvents()
|
||||
// TODO Add timers to laf::os library so we can wait for then in
|
||||
// the OS message loop.
|
||||
bool canWait = (msg_queue.empty() &&
|
||||
redrawState == RedrawState::Normal &&
|
||||
!Timer::haveRunningTimers());
|
||||
|
||||
m_eventQueue->getEvent(sheEvent, canWait);
|
||||
|
Loading…
Reference in New Issue
Block a user