summaryrefslogtreecommitdiff
path: root/gdk/broadway/gdkeventsource.c
diff options
context:
space:
mode:
authorOwen W. Taylor <otaylor@fishsoup.net>2013-11-11 18:04:34 -0500
committerMatthias Clasen <mclasen@redhat.com>2013-11-11 23:17:14 -0500
commitf50a3af1b7a24836c784797484cae14052cbfcdd (patch)
tree2bb0800523535b82ebc340506440a81c1d7c1465 /gdk/broadway/gdkeventsource.c
parent0db8aeaad9f81d7d3b582cc9f0b096705bf0591a (diff)
downloadgtk+-f50a3af1b7a24836c784797484cae14052cbfcdd.tar.gz
Handle recursion from motion event handlers
If a motion event handler (or other handler running from the flush-events phase of the frame clock) recursed the main loop then flushing wouldn't complete until after the recursed main loop returned, and various aspects of the state would get out of sync. To fix this, change flushing of the event queue to simply mark events as ready to flush, and let normal event delivery handle the rest. https://bugzilla.gnome.org/show_bug.cgi?id=705176
Diffstat (limited to 'gdk/broadway/gdkeventsource.c')
-rw-r--r--gdk/broadway/gdkeventsource.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/gdk/broadway/gdkeventsource.c b/gdk/broadway/gdkeventsource.c
index e6c0a7f5a6..d7cdede0a4 100644
--- a/gdk/broadway/gdkeventsource.c
+++ b/gdk/broadway/gdkeventsource.c
@@ -62,10 +62,7 @@ gdk_event_source_prepare (GSource *source,
*timeout = -1;
- if (display->event_pause_count > 0)
- retval = FALSE;
- else
- retval = (_gdk_event_queue_find_first (display) != NULL);
+ retval = (_gdk_event_queue_find_first (display) != NULL);
gdk_threads_leave ();
@@ -80,9 +77,8 @@ gdk_event_source_check (GSource *source)
gdk_threads_enter ();
- if (event_source->display->event_pause_count > 0)
- retval = FALSE;
- else if (event_source->event_poll_fd.revents & G_IO_IN)
+ if (event_source->display->event_pause_count > 0 ||
+ event_source->event_poll_fd.revents & G_IO_IN)
retval = (_gdk_event_queue_find_first (event_source->display) != NULL);
else
retval = FALSE;