mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-21 08:28:53 +02:00
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.
This commit is contained in:
@@ -2839,12 +2839,11 @@ g_main_context_check (GMainContext *context,
|
|||||||
UNLOCK_CONTEXT (context);
|
UNLOCK_CONTEXT (context);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!context->poll_waiting)
|
if (context->wake_up_rec.events)
|
||||||
g_wakeup_acknowledge (context->wakeup);
|
g_wakeup_acknowledge (context->wakeup);
|
||||||
|
|
||||||
else
|
context->poll_waiting = FALSE;
|
||||||
context->poll_waiting = FALSE;
|
|
||||||
|
|
||||||
/* If the set of poll file descriptors changed, bail out
|
/* If the set of poll file descriptors changed, bail out
|
||||||
* and let the main loop rerun
|
* and let the main loop rerun
|
||||||
|
Reference in New Issue
Block a user