[glib/wip/glib-next: 20/27] GMain: simplify logic for g_wakeup_acknowledge()
- From: Ryan Lortie <ryanl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/wip/glib-next: 20/27] GMain: simplify logic for g_wakeup_acknowledge()
- Date: Thu, 1 Sep 2011 05:26:46 +0000 (UTC)
commit 4cbffbbdd0653c1a14fcb69209580fc3f328b64d
Author: Ryan Lortie <desrt desrt ca>
Date: Wed Aug 31 22:07:02 2011 -0400
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 files changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/glib/gmain.c b/glib/gmain.c
index 1a54b68..6201e80 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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]