Fix infinite loop in gdkevents.c _gdk_event_queue_find_first

This commit is contained in:
Hamish Mackenzie 2013-09-29 05:06:53 +13:00 committed by John Ralls
parent 3ca7cfe29b
commit 83e26db7f0

View File

@ -96,16 +96,16 @@ _gdk_event_queue_find_first (GdkDisplay *display)
{ {
GdkEventPrivate *event = tmp_list->data; GdkEventPrivate *event = tmp_list->data;
if (event->flags & GDK_EVENT_PENDING) if (!(event->flags & GDK_EVENT_PENDING))
continue; {
if (pending_motion)
return pending_motion;
if (pending_motion) if (event->event.type == GDK_MOTION_NOTIFY && !display->flushing_events)
return pending_motion; pending_motion = tmp_list;
else
if (event->event.type == GDK_MOTION_NOTIFY && !display->flushing_events) return tmp_list;
pending_motion = tmp_list; }
else
return tmp_list;
tmp_list = g_list_next (tmp_list); tmp_list = g_list_next (tmp_list);
} }