diff options
author | Owen W. Taylor <otaylor@fishsoup.net> | 2013-11-11 18:04:34 -0500 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2013-11-11 23:17:14 -0500 |
commit | f50a3af1b7a24836c784797484cae14052cbfcdd (patch) | |
tree | 2bb0800523535b82ebc340506440a81c1d7c1465 /gdk/x11/gdkeventsource.c | |
parent | 0db8aeaad9f81d7d3b582cc9f0b096705bf0591a (diff) | |
download | gtk+-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/x11/gdkeventsource.c')
-rw-r--r-- | gdk/x11/gdkeventsource.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gdk/x11/gdkeventsource.c b/gdk/x11/gdkeventsource.c index 4b1a546945..7fff28f0c2 100644 --- a/gdk/x11/gdkeventsource.c +++ b/gdk/x11/gdkeventsource.c @@ -278,7 +278,7 @@ gdk_event_source_prepare (GSource *source, *timeout = -1; if (display->event_pause_count > 0) - retval = FALSE; + retval = _gdk_event_queue_find_first (display) != NULL; else retval = (_gdk_event_queue_find_first (display) != NULL || gdk_check_xpending (display)); @@ -297,7 +297,7 @@ gdk_event_source_check (GSource *source) gdk_threads_enter (); if (event_source->display->event_pause_count > 0) - retval = FALSE; + retval = _gdk_event_queue_find_first (event_source->display) != NULL; else if (event_source->event_poll_fd.revents & G_IO_IN) retval = (_gdk_event_queue_find_first (event_source->display) != NULL || gdk_check_xpending (event_source->display)); |