From 8b95515c0c17126a4400d41bb114fdc84b85121c Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Mon, 10 Nov 2014 15:24:08 -0500 Subject: [PATCH] inspector: Only set debug-updates for the default display Use the new private API to isolate the inspector itself from this setting. --- gtk/inspector/visual.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/gtk/inspector/visual.c b/gtk/inspector/visual.c index c9a68c8636..cd67d14c1e 100644 --- a/gtk/inspector/visual.c +++ b/gtk/inspector/visual.c @@ -130,10 +130,22 @@ redraw_everything (void) static void updates_activate (GtkSwitch *sw) { - gdk_window_set_debug_updates (gtk_switch_get_active (sw)); + gboolean updates; + + updates = gtk_switch_get_active (sw); + GDK_PRIVATE_CALL (gdk_display_set_debug_updates) (gdk_display_get_default (), updates); redraw_everything (); } +static void +init_updates (GtkInspectorVisual *vis) +{ + gboolean updates; + + updates = GDK_PRIVATE_CALL (gdk_display_get_debug_updates) (gdk_display_get_default ()); + gtk_switch_set_active (GTK_SWITCH (vis->priv->updates_switch), updates); +} + static void baselines_activate (GtkSwitch *sw) { @@ -588,6 +600,7 @@ gtk_inspector_visual_init (GtkInspectorVisual *vis) init_font (vis); init_scale (vis); init_rendering_mode (vis); + init_updates (vis); init_animation (vis); init_touchscreen (vis); init_gl (vis);