GWakeup: Avoid extraneous wakeups
authorMatthias Clasen <mclasen@redhat.com>
Fri, 15 Jun 2012 19:16:13 +0000 (15:16 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Fri, 15 Jun 2012 19:16:13 +0000 (15:16 -0400)
We were checking the wrong number here, and waking up unnecessarily.
https://bugzilla.gnome.org/show_bug.cgi?id=678052

glib/gmain.c

index 760f179..60c80c7 100644 (file)
@@ -2976,7 +2976,7 @@ g_main_context_check (GMainContext *context,
       return FALSE;
     }
 
-  if (context->wake_up_rec.events)
+  if (context->wake_up_rec.revents)
     g_wakeup_acknowledge (context->wakeup);
 
   /* If the set of poll file descriptors changed, bail out