]> Pileus Git - ~andy/gtk/commitdiff
perf: Use a temp window instead of a normal one
authorBenjamin Otte <otte@redhat.com>
Fri, 27 Aug 2010 10:30:54 +0000 (12:30 +0200)
committerBenjamin Otte <otte@redhat.com>
Sun, 26 Sep 2010 13:11:30 +0000 (15:11 +0200)
This way, we don't need hacks to not set the background.

perf/gtkwidgetprofiler.c

index c5b2cddbd633680e06267aa1ad3d52f2bfc97af7..f8ab9f926a6d942ee53edda00d15a028a46fb9bc 100644 (file)
@@ -408,13 +408,12 @@ profile_expose (GtkWidgetProfiler *profiler)
   attr.width = allocation.width;
   attr.height = allocation.width;
   attr.wclass = GDK_INPUT_OUTPUT;
-  attr.window_type = GDK_WINDOW_CHILD;
+  attr.window_type = GDK_WINDOW_TEMP;
 
   attr_mask = GDK_WA_X | GDK_WA_Y;
 
-  window = gdk_window_new (gtk_widget_get_window (priv->toplevel),
+  window = gdk_window_new (gdk_screen_get_root_window (gtk_widget_get_screen (priv->toplevel)),
                            &attr, attr_mask);
-  gdk_window_set_back_pixmap (window, NULL, TRUE); /* avoid flicker */
 
   gdk_window_show (window);
   gdk_window_hide (window);