]> git.saurik.com Git - wxWidgets.git/blobdiff - src/motif/dialog.cpp
Minor compilation fixes for Borland.
[wxWidgets.git] / src / motif / dialog.cpp
index a9a097e096deec8e72bb38942e44a7ab78b6c341..cfd12bece73fc1571ccef7b73a70b2c2005cac14 100644 (file)
@@ -499,6 +499,20 @@ int wxDialog::ShowModal()
 
         XtAppNextEvent((XtAppContext) wxTheApp->GetAppContext(), &event);
         wxTheApp->ProcessXEvent((WXEvent*) &event);
+
+        if (XtAppPending( (XtAppContext) wxTheApp->GetAppContext() ) == 0)
+        {
+            if (!wxTheApp->ProcessIdle())
+            {
+#if wxUSE_THREADS
+                // leave the main loop to give other threads a chance to
+                // perform their GUI work
+                wxMutexGuiLeave();
+                wxUsleep(20);
+                wxMutexGuiEnter();
+#endif
+            }
+        }
     }
 
     // Remove modal dialog flag from stack