]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/thread.cpp
compilation fix
[wxWidgets.git] / src / msw / thread.cpp
index 976c7412d683b887b2f9c33adde2282502275ad5..46719dc9c2f35d8f2d0f00006d3ddf2d2ea53fe8 100644 (file)
@@ -389,6 +389,8 @@ private:
 
     wxMutex& m_mutex;
     wxSemaphore m_semaphore;
+
+    DECLARE_NO_COPY_CLASS(wxConditionInternal)
 };
 
 wxConditionInternal::wxConditionInternal(wxMutex& mutex)
@@ -816,7 +818,15 @@ wxThreadInternal::WaitForTerminate(bool shouldCancel,
                     break;
 
                 case WAIT_OBJECT_0 + 1:
-                    // new message arrived, process it
+                    // new message arrived, process it -- but only if we're the
+                    // main thread as we don't support processing messages in
+                    // the other ones
+                    //
+                    // NB: we still must include QS_ALLINPUT even when waiting
+                    //     in a secondary thread because if it had created some
+                    //     window somehow (possible not even using wxWindows)
+                    //     the system might dead lock then
+                    if ( wxThread::IsMain() )
                     {
                         // it looks that sometimes WAIT_OBJECT_0 + 1 is
                         // returned but there are no messages in the thread