[gtk+/gtk-3-14] Resume events when disconnecting from a frame clock
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-3-14] Resume events when disconnecting from a frame clock
- Date: Sat, 31 Jan 2015 19:28:02 +0000 (UTC)
commit 4a5d06fb72d10d0df9656ac0cdea68e5f296c67f
Author: Tom Hughes <tom compton nu>
Date: Mon Jan 26 21:52:00 2015 +0000
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
gdk/gdkinternals.h | 1 +
gdk/gdkwindow.c | 7 +++++++
2 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/gdk/gdkinternals.h b/gdk/gdkinternals.h
index 5e98f96..4b3f7bf 100644
--- a/gdk/gdkinternals.h
+++ b/gdk/gdkinternals.h
@@ -240,6 +240,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
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index 264a051..4787d8f 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -10607,6 +10607,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
@@ -10633,6 +10635,8 @@ gdk_window_resume_events (GdkFrameClock *clock,
display = gdk_window_get_display (window);
_gdk_display_unpause_events (display);
+
+ window->frame_clock_events_paused = FALSE;
}
static void
@@ -10665,6 +10669,9 @@ 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]