]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/evtloop.cpp
don't declare inline function with dllexport declaration, this provokes mingw32 warni...
[wxWidgets.git] / src / gtk / evtloop.cpp
index 16fa2087f26c1fa182f33cb1b014d1c7ca1a90a5..25806a312c11d5afff4c7460a447b007c7859167 100644 (file)
@@ -98,14 +98,14 @@ void wxEventLoop::Exit(int rc)
 
 bool wxEventLoop::Pending() const
 {
-    if (wxTheApp)
-    {
-        // We need to remove idle callbacks or gtk_events_pending will
-        // never return false.
-        wxTheApp->SuspendIdleCallback();
-    }
-
-    return gtk_events_pending();
+    bool pending;
+    wxApp* app = wxTheApp;
+    if (app != NULL)
+        // app->EventsPending() avoids false positives from our idle source
+        pending = app->EventsPending();
+    else
+        pending = gtk_events_pending() != 0;
+    return pending;
 }
 
 bool wxEventLoop::Dispatch()