mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-06 00:30:08 +00:00
gdk_display_get_event: don't unqueue events from the windowing system when paused
Unqueuing events from the windowing system when paused could result in weird reordering if event filters resulted in application-visible behavior. Since we now resume events when the frame clock is frozen, we now no longer count on low-level event handling running while event handling is paused. https://bugzilla.gnome.org/show_bug.cgi?id=685460
This commit is contained in:
parent
3cef97f10d
commit
d446dda920
@ -307,11 +307,11 @@ gdk_display_get_event (GdkDisplay *display)
|
||||
{
|
||||
g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL);
|
||||
|
||||
GDK_DISPLAY_GET_CLASS (display)->queue_events (display);
|
||||
|
||||
if (display->events_paused)
|
||||
return NULL;
|
||||
else
|
||||
|
||||
GDK_DISPLAY_GET_CLASS (display)->queue_events (display);
|
||||
|
||||
return _gdk_event_unqueue (display);
|
||||
}
|
||||
|
||||
|
@ -276,6 +276,10 @@ gdk_event_source_prepare (GSource *source,
|
||||
gdk_threads_enter ();
|
||||
|
||||
*timeout = -1;
|
||||
|
||||
if (display->event_pause_count > 0)
|
||||
retval = FALSE;
|
||||
else
|
||||
retval = (_gdk_event_queue_find_first (display) != NULL ||
|
||||
gdk_check_xpending (display));
|
||||
|
||||
@ -292,7 +296,9 @@ gdk_event_source_check (GSource *source)
|
||||
|
||||
gdk_threads_enter ();
|
||||
|
||||
if (event_source->event_poll_fd.revents & G_IO_IN)
|
||||
if (event_source->display->event_pause_count > 0)
|
||||
retval = FALSE;
|
||||
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));
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user