Skip to content

Commit ca7acec

Browse files
committed
More linux fixes
1 parent cfc1a3f commit ca7acec

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

modules/yup_events/messages/yup_MessageManager.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,10 @@ void MessageManager::runDispatchLoop()
153153

154154
void MessageManager::stopDispatchLoop()
155155
{
156-
(new QuitMessage())->post();
156+
quitMessageReceived = true;
157157
quitMessagePosted = true;
158+
159+
(new QuitMessage())->post();
158160
}
159161

160162
#if YUP_MODAL_LOOPS_PERMITTED

modules/yup_events/native/yup_Messaging_linux.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,12 @@ bool yup_dispatchNextMessageOnSystemQueue (bool returnIfNoPendingMessages)
338338
if (LinuxErrorHandling::keyboardBreakOccurred)
339339
YUPApplicationBase::quit();
340340

341+
if (auto* mm = MessageManager::getInstanceWithoutCreating())
342+
{
343+
if (mm->hasStopMessageBeenSent())
344+
return false;
345+
}
346+
341347
auto* runLoop = InternalRunLoop::getInstanceWithoutCreating();
342348
if (runLoop == nullptr)
343349
return false;

0 commit comments

Comments
 (0)