1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-28 02:30:05 +00:00

Made it possible to build plugins with JUCE_MODAL_LOOPS_PERMITTED turned off

This commit is contained in:
jules 2015-03-30 14:13:57 +01:00
parent 8fb779e2fb
commit c0ccc756e4

View file

@ -216,6 +216,7 @@ void detachComponentFromWindowRef (Component* comp, void* window, bool isNSView)
else
[hostWindow release];
#if JUCE_MODAL_LOOPS_PERMITTED
static bool needToRunMessageLoop = ! getHostType().isReaper();
// The event loop needs to be run between closing the window and deleting the plugin,
@ -226,6 +227,7 @@ void detachComponentFromWindowRef (Component* comp, void* window, bool isNSView)
if (needToRunMessageLoop)
for (int i = 20; --i >= 0;)
MessageManager::getInstance()->runDispatchLoopUntil (1);
#endif
return;
}