diff options
author | Hamish Mackenzie <Hamish.K.Mackenzie@googlemail.com> | 2013-09-29 05:06:53 +1300 |
---|---|---|
committer | John Ralls <jralls@ceridwen.us> | 2013-10-11 11:06:23 -0700 |
commit | d9cfe40aebc081acba274231fb740c59a6ec148b (patch) | |
tree | f9d662b89436c8103be3d13d78e388ce63472537 /gdk | |
parent | cf66cf906ec148ffbfa586b8e465d15b066412ae (diff) | |
download | gtk+-d9cfe40aebc081acba274231fb740c59a6ec148b.tar.gz |
Fix infinite loop in gdkevents.c _gdk_event_queue_find_first
Diffstat (limited to 'gdk')
-rw-r--r-- | gdk/gdkevents.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/gdk/gdkevents.c b/gdk/gdkevents.c index 327b543824..e770f4777b 100644 --- a/gdk/gdkevents.c +++ b/gdk/gdkevents.c @@ -96,16 +96,16 @@ _gdk_event_queue_find_first (GdkDisplay *display) { GdkEventPrivate *event = tmp_list->data; - if (event->flags & GDK_EVENT_PENDING) - continue; - - if (pending_motion) - return pending_motion; + if (!(event->flags & GDK_EVENT_PENDING)) + { + if (pending_motion) + return pending_motion; - if (event->event.type == GDK_MOTION_NOTIFY && !display->flushing_events) - pending_motion = tmp_list; - else - return tmp_list; + if (event->event.type == GDK_MOTION_NOTIFY && !display->flushing_events) + pending_motion = tmp_list; + else + return tmp_list; + } tmp_list = g_list_next (tmp_list); } |