[gtk+/refactor] perf/gtkwidgetprofiler.c: Use accessor functions to access GtkWidget
- From: Javier Jardón <jjardon src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/refactor] perf/gtkwidgetprofiler.c: Use accessor functions to access GtkWidget
- Date: Sun, 15 Aug 2010 22:41:45 +0000 (UTC)
commit 7cbe91ba8cb8e8fd4841b3a619f6ed3c8781cd37
Author: Javier Jardón <jjardon gnome org>
Date: Mon Aug 16 00:35:32 2010 +0200
perf/gtkwidgetprofiler.c: Use accessor functions to access GtkWidget
perf/gtkwidgetprofiler.c | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
---
diff --git a/perf/gtkwidgetprofiler.c b/perf/gtkwidgetprofiler.c
index 6982714..c5b2cdd 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]