diff options
author | Benjamin Otte <otte@redhat.com> | 2010-09-08 22:08:42 +0200 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2010-09-26 15:11:40 +0200 |
commit | eed9468e06bd9dae9901f4d413a8085ddcd78c28 (patch) | |
tree | e13abe8db12c50f91505bf727c136efd62056513 /perf | |
parent | b452bb768d523a3142bd1d6785cdee3c04e54a3b (diff) | |
download | gtk+-eed9468e06bd9dae9901f4d413a8085ddcd78c28.tar.gz |
perf: Connect to draw signal
Diffstat (limited to 'perf')
-rw-r--r-- | perf/gtkwidgetprofiler.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/perf/gtkwidgetprofiler.c b/perf/gtkwidgetprofiler.c index f8ab9f926a..94b911acda 100644 --- a/perf/gtkwidgetprofiler.c +++ b/perf/gtkwidgetprofiler.c @@ -20,7 +20,7 @@ struct _GtkWidgetProfilerPrivate { GTimer *timer; - gulong toplevel_expose_event_id; + gulong toplevel_draw_id; gulong toplevel_property_notify_event_id; GdkAtom profiler_atom; @@ -96,8 +96,8 @@ reset_state (GtkWidgetProfiler *profiler) if (priv->toplevel) { - g_signal_handler_disconnect (priv->toplevel, priv->toplevel_expose_event_id); - priv->toplevel_expose_event_id = 0; + g_signal_handler_disconnect (priv->toplevel, priv->toplevel_draw_id); + priv->toplevel_draw_id = 0; g_signal_handler_disconnect (priv->toplevel, priv->toplevel_property_notify_event_id); priv->toplevel_property_notify_event_id = 0; @@ -197,7 +197,7 @@ toplevel_property_notify_event_cb (GtkWidget *widget, GdkEventProperty *event, g } static gboolean -toplevel_idle_after_expose_cb (gpointer data) +toplevel_idle_after_draw_cb (gpointer data) { GtkWidgetProfiler *profiler; GtkWidgetProfilerPrivate *priv; @@ -217,13 +217,13 @@ toplevel_idle_after_expose_cb (gpointer data) } static gboolean -toplevel_expose_event_cb (GtkWidget *widget, GdkEventExpose *event, gpointer data) +toplevel_draw_cb (GtkWidget *widget, cairo_t *cr, gpointer data) { GtkWidgetProfiler *profiler; profiler = GTK_WIDGET_PROFILER (data); - gdk_threads_add_idle_full (G_PRIORITY_HIGH, toplevel_idle_after_expose_cb, profiler, NULL); + gdk_threads_add_idle_full (G_PRIORITY_HIGH, toplevel_idle_after_draw_cb, profiler, NULL); return FALSE; } @@ -235,8 +235,8 @@ instrument_toplevel (GtkWidgetProfiler *profiler, priv = profiler->priv; - priv->toplevel_expose_event_id = g_signal_connect (toplevel, "expose-event", - G_CALLBACK (toplevel_expose_event_cb), profiler); + priv->toplevel_draw_id = g_signal_connect (toplevel, "draw", + G_CALLBACK (toplevel_draw_cb), profiler); gtk_widget_add_events (toplevel, GDK_PROPERTY_CHANGE_MASK); priv->toplevel_property_notify_event_id = g_signal_connect (toplevel, "property-notify-event", |