| @@ -210,15 +210,8 @@ public: | |||||
| ~SharedMessageThread() | ~SharedMessageThread() | ||||
| { | { | ||||
| signalThreadShouldExit(); | signalThreadShouldExit(); | ||||
| const int quitMessageId = 0xfffff321; | |||||
| Message* const m = new Message (quitMessageId, 1, 0, 0); | |||||
| if (! juce_postMessageToSystemQueue (m)) | |||||
| delete m; | |||||
| JUCEApplication::quit(); | |||||
| waitForThreadToExit (5000); | waitForThreadToExit (5000); | ||||
| clearSingletonInstance(); | clearSingletonInstance(); | ||||
| } | } | ||||
| @@ -226,11 +219,10 @@ public: | |||||
| { | { | ||||
| MessageManager* const messageManager = MessageManager::getInstance(); | MessageManager* const messageManager = MessageManager::getInstance(); | ||||
| const int originalThreadId = messageManager->getCurrentMessageThread(); | |||||
| messageManager->setCurrentMessageThread (getThreadId()); | |||||
| const int64 originalThreadId = messageManager->getCurrentMessageThread(); | |||||
| messageManager->setCurrentMessageThread (Thread::getCurrentThreadId()); | |||||
| while (! threadShouldExit() | |||||
| && messageManager->dispatchNextMessage()) | |||||
| while ((! threadShouldExit()) && messageManager->runDispatchLoopUntil (250)) | |||||
| { | { | ||||
| } | } | ||||
| @@ -238,9 +230,8 @@ public: | |||||
| } | } | ||||
| juce_DeclareSingleton (SharedMessageThread, false) | juce_DeclareSingleton (SharedMessageThread, false) | ||||
| }; | |||||
| }; | |||||
| juce_ImplementSingleton (SharedMessageThread); | |||||
| #endif | #endif | ||||
| @@ -444,6 +435,10 @@ public: | |||||
| { | { | ||||
| if (editorComp == 0) | if (editorComp == 0) | ||||
| { | { | ||||
| #if JUCE_LINUX | |||||
| const MessageManagerLock mml; | |||||
| #endif | |||||
| AudioProcessorEditor* const ed = filter->createEditorIfNeeded(); | AudioProcessorEditor* const ed = filter->createEditorIfNeeded(); | ||||
| if (ed != 0) | if (ed != 0) | ||||
| @@ -451,6 +446,7 @@ public: | |||||
| else | else | ||||
| cEffect.flags &= ~effFlagsHasEditor; | cEffect.flags &= ~effFlagsHasEditor; | ||||
| filter->editorBeingDeleted (ed); | |||||
| delete ed; | delete ed; | ||||
| } | } | ||||
| @@ -35941,7 +35941,7 @@ bool MessageManager::isThisTheMessageThread() const throw() | |||||
| return Thread::getCurrentThreadId() == messageThreadId; | return Thread::getCurrentThreadId() == messageThreadId; | ||||
| } | } | ||||
| void MessageManager::setCurrentMessageThread (const int threadId) throw() | |||||
| void MessageManager::setCurrentMessageThread (const int64 threadId) throw() | |||||
| { | { | ||||
| messageThreadId = threadId; | messageThreadId = threadId; | ||||
| } | } | ||||
| @@ -37274,7 +37274,7 @@ public: | |||||
| (Best to ignore this method unless you really know what you're doing..) | (Best to ignore this method unless you really know what you're doing..) | ||||
| @see getCurrentMessageThread | @see getCurrentMessageThread | ||||
| */ | */ | ||||
| void setCurrentMessageThread (const int threadId) throw(); | |||||
| void setCurrentMessageThread (const int64 threadId) throw(); | |||||
| /** Returns the ID of the current message thread, as set by setCurrentMessageThread(). | /** Returns the ID of the current message thread, as set by setCurrentMessageThread(). | ||||
| @@ -177,7 +177,7 @@ bool MessageManager::isThisTheMessageThread() const throw() | |||||
| return Thread::getCurrentThreadId() == messageThreadId; | return Thread::getCurrentThreadId() == messageThreadId; | ||||
| } | } | ||||
| void MessageManager::setCurrentMessageThread (const int threadId) throw() | |||||
| void MessageManager::setCurrentMessageThread (const int64 threadId) throw() | |||||
| { | { | ||||
| messageThreadId = threadId; | messageThreadId = threadId; | ||||
| } | } | ||||
| @@ -107,7 +107,7 @@ public: | |||||
| (Best to ignore this method unless you really know what you're doing..) | (Best to ignore this method unless you really know what you're doing..) | ||||
| @see getCurrentMessageThread | @see getCurrentMessageThread | ||||
| */ | */ | ||||
| void setCurrentMessageThread (const int threadId) throw(); | |||||
| void setCurrentMessageThread (const int64 threadId) throw(); | |||||
| /** Returns the ID of the current message thread, as set by setCurrentMessageThread(). | /** Returns the ID of the current message thread, as set by setCurrentMessageThread(). | ||||