From f9100719bde0a5044849e464ba22b3828565a0c2 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sun, 14 Jan 2018 16:07:12 -0500 Subject: [PATCH] inspector: Turn off gsk debugging We don't want debug spew from the renderer that is used for the inspector window, so turn it off. --- gtk/inspector/window.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/gtk/inspector/window.c b/gtk/inspector/window.c index 7c887bfeee..15b38e91e5 100644 --- a/gtk/inspector/window.c +++ b/gtk/inspector/window.c @@ -49,10 +49,11 @@ #include "gtkstack.h" #include "gtktreeviewcolumn.h" #include "gtkmodulesprivate.h" -#include "gtkwindow.h" +#include "gtkwindowprivate.h" #include "gtkwindowgroup.h" #include "gtkprivate.h" #include "gdk-private.h" +#include "gskrendererprivate.h" G_DEFINE_TYPE (GtkInspectorWindow, gtk_inspector_window, GTK_TYPE_WINDOW) @@ -243,6 +244,17 @@ object_details_changed (GtkWidget *combo, gtk_stack_set_visible_child_name (GTK_STACK (iw->object_center_stack), "title"); } +static void +gtk_inspector_window_realize (GtkWidget *widget) +{ + GskRenderer *renderer; + + GTK_WIDGET_CLASS (gtk_inspector_window_parent_class)->realize (widget); + + renderer = gtk_window_get_renderer (GTK_WINDOW (widget)); + gsk_renderer_set_debug_flags (renderer, 0); +} + static void gtk_inspector_window_class_init (GtkInspectorWindowClass *klass) { @@ -250,6 +262,7 @@ gtk_inspector_window_class_init (GtkInspectorWindowClass *klass) GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass); object_class->constructed = gtk_inspector_window_constructed; + widget_class->realize = gtk_inspector_window_realize; gtk_widget_class_set_template_from_resource (widget_class, "/org/gtk/libgtk/inspector/window.ui");