Commit ff256956 authored by Tom Hughes's avatar Tom Hughes Committed by Matthias Clasen

Resume events when disconnecting from a frame clock

If we are disconnecting from a frame clock that has paused event
processing and hasn't issued a resume yet make sure we resume the
events or they will stay blocked forever.

https://bugzilla.gnome.org/show_bug.cgi?id=742636
parent d86d406c
......@@ -333,6 +333,7 @@ struct _GdkWindow
guint in_update : 1;
guint geometry_dirty : 1;
guint event_compression : 1;
guint frame_clock_events_paused : 1;
/* The GdkWindow that has the impl, ref:ed if another window.
* This ref is required to keep the wrapper of the impl window alive
......
......@@ -10913,6 +10913,8 @@ gdk_window_flush_events (GdkFrameClock *clock,
_gdk_display_pause_events (display);
gdk_frame_clock_request_phase (clock, GDK_FRAME_CLOCK_PHASE_RESUME_EVENTS);
window->frame_clock_events_paused = TRUE;
}
static void
......@@ -10939,6 +10941,8 @@ gdk_window_resume_events (GdkFrameClock *clock,
display = gdk_window_get_display (window);
_gdk_display_unpause_events (display);
window->frame_clock_events_paused = TRUE;
}
static void
......@@ -10971,6 +10975,11 @@ gdk_window_set_frame_clock (GdkWindow *window,
if (window->frame_clock)
{
if (window->frame_clock_events_paused)
{
gdk_window_resume_events (window->frame_clock, G_OBJECT (window));
}
g_signal_handlers_disconnect_by_func (G_OBJECT (window->frame_clock),
G_CALLBACK (gdk_window_flush_events),
window);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment