diff options
author | Javier Jardón <jjardon@gnome.org> | 2010-08-16 00:35:32 +0200 |
---|---|---|
committer | Javier Jardón <jjardon@gnome.org> | 2010-08-22 18:29:20 +0200 |
commit | b6306a0defa721be888ff6685f3bbbbd133ac8ec (patch) | |
tree | 73849ab59dd9fcc015b6ad80586dab6459f83d3c /perf | |
parent | 76b0a349ef2571cf177a2bdd79a6cda77f896b0d (diff) | |
download | gtk+-b6306a0defa721be888ff6685f3bbbbd133ac8ec.tar.gz |
perf/gtkwidgetprofiler.c: Use accessor functions to access GtkWidget
Diffstat (limited to 'perf')
-rw-r--r-- | perf/gtkwidgetprofiler.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/perf/gtkwidgetprofiler.c b/perf/gtkwidgetprofiler.c index 69827146f5..c5b2cddbd6 100644 --- a/perf/gtkwidgetprofiler.c +++ b/perf/gtkwidgetprofiler.c @@ -205,7 +205,7 @@ toplevel_idle_after_expose_cb (gpointer data) profiler = GTK_WIDGET_PROFILER (data); priv = profiler->priv; - gdk_property_change (priv->toplevel->window, + gdk_property_change (gtk_widget_get_window (priv->toplevel), priv->profiler_atom, gdk_atom_intern ("STRING", FALSE), 8, @@ -390,6 +390,7 @@ static void profile_expose (GtkWidgetProfiler *profiler) { GtkWidgetProfilerPrivate *priv; + GtkAllocation allocation; GdkWindow *window; GdkWindowAttr attr; int attr_mask; @@ -400,16 +401,19 @@ profile_expose (GtkWidgetProfiler *profiler) /* Time creation */ + gtk_widget_get_allocation (priv->toplevel, &allocation); + attr.x = 0; attr.y = 0; - attr.width = priv->toplevel->allocation.width; - attr.height = priv->toplevel->allocation.width; + attr.width = allocation.width; + attr.height = allocation.width; attr.wclass = GDK_INPUT_OUTPUT; attr.window_type = GDK_WINDOW_CHILD; attr_mask = GDK_WA_X | GDK_WA_Y; - window = gdk_window_new (priv->toplevel->window, &attr, attr_mask); + window = gdk_window_new (gtk_widget_get_window (priv->toplevel), + &attr, attr_mask); gdk_window_set_back_pixmap (window, NULL, TRUE); /* avoid flicker */ gdk_window_show (window); |