mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 11:32:04 +00:00
Check for pending events from the tail of the events queue
When checking for pending events we need to look from the tail of the list backwards.
This commit is contained in:
parent
1a2f0c95f5
commit
9d61c5c856
@ -498,8 +498,8 @@ clutter_event_put (ClutterEvent *event)
|
||||
{
|
||||
ClutterMainContext *context = clutter_context_get_default ();
|
||||
|
||||
/* FIXME: check queue is valid */
|
||||
g_return_if_fail (context != NULL);
|
||||
g_return_if_fail (event != NULL);
|
||||
g_return_if_fail (context->events_queue != NULL);
|
||||
|
||||
g_queue_push_head (context->events_queue, clutter_event_copy (event));
|
||||
}
|
||||
@ -528,14 +528,14 @@ clutter_events_pending (void)
|
||||
return FALSE;
|
||||
|
||||
/* find the first non pending item */
|
||||
item = context->events_queue->head;
|
||||
item = context->events_queue->tail;
|
||||
while (item)
|
||||
{
|
||||
ClutterEventPrivate *event = item->data;
|
||||
if (!(event->flags & CLUTTER_EVENT_PENDING))
|
||||
return TRUE;
|
||||
|
||||
item = item->next;
|
||||
item = item->prev;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
|
Loading…
Reference in New Issue
Block a user