summaryrefslogtreecommitdiff
path: root/gdk
diff options
context:
space:
mode:
authorHamish Mackenzie <Hamish.K.Mackenzie@googlemail.com>2013-09-29 05:06:53 +1300
committerJohn Ralls <jralls@ceridwen.us>2013-10-11 11:06:23 -0700
commitd9cfe40aebc081acba274231fb740c59a6ec148b (patch)
treef9d662b89436c8103be3d13d78e388ce63472537 /gdk
parentcf66cf906ec148ffbfa586b8e465d15b066412ae (diff)
downloadgtk+-d9cfe40aebc081acba274231fb740c59a6ec148b.tar.gz
Fix infinite loop in gdkevents.c _gdk_event_queue_find_first
Diffstat (limited to 'gdk')
-rw-r--r--gdk/gdkevents.c18
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);
}