]> git.saurik.com Git - wxWidgets.git/blobdiff - src/motif/evtloop.cpp
Wait() doesn't cancel the thread any longer
[wxWidgets.git] / src / motif / evtloop.cpp
index f3964a17fd3905989a91586c88fb5f38ee05f9e2..94f636eebfdc55b38ea3c504fba896b1e949a207 100644 (file)
@@ -402,9 +402,11 @@ public:
 
     virtual bool OnInit()
     {
+        // Must be done before modules are initialized
+#if 0
         if( pipe(idleFds) != 0 )
             return false;
-
+#endif
         return true;
     }
 
@@ -468,8 +470,18 @@ void wxApp::WakeUpIdle()
     ::wxBreakDispatch();
 }
 
+bool wxInitIdleFds()
+{
+    if( pipe(idleFds) != 0 )
+        return false;
+    return true;
+}
+
 bool wxAddIdleCallback()
 {
+    if (!wxInitIdleFds())
+        return false;
+    
     // install input handler for wxWakeUpIdle
     inputId = XtAppAddInput( (XtAppContext) wxTheApp->GetAppContext(),
                              idleFds[0],