From 7eae486179e2799c369ed9ffcea663bf9161ce79 Mon Sep 17 00:00:00 2001 From: Ryan Lortie Date: Wed, 31 Aug 2011 22:07:02 -0400 Subject: [PATCH] GMain: simplify logic for g_wakeup_acknowledge() Instead of messing around with context->poll_waiting, just look at the GPollFD to see if the GWakeup needs to be acknowledged. --- glib/gmain.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/glib/gmain.c b/glib/gmain.c index a643416..8a23a83 100644 --- a/glib/gmain.c +++ b/glib/gmain.c @@ -2839,12 +2839,11 @@ g_main_context_check (GMainContext *context, UNLOCK_CONTEXT (context); return FALSE; } - - if (!context->poll_waiting) + + if (context->wake_up_rec.events) g_wakeup_acknowledge (context->wakeup); - else - context->poll_waiting = FALSE; + context->poll_waiting = FALSE; /* If the set of poll file descriptors changed, bail out * and let the main loop rerun -- 2.7.4