diff options
author | Benjamin Otte <otte@redhat.com> | 2010-09-09 01:16:28 +0200 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2010-09-26 15:11:41 +0200 |
commit | 9cd83da6dcff782f571124c4e9db6dd496de06fd (patch) | |
tree | 154cb6492a8934779dd699bb3184b933e36a0ba0 | |
parent | 97b997d59e654c398d56b7883d671fc99d53f43b (diff) | |
download | gtk+-9cd83da6dcff782f571124c4e9db6dd496de06fd.tar.gz |
tests: Use draw signal in testinput
-rw-r--r-- | tests/testinput.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/tests/testinput.c b/tests/testinput.c index aecdb5b153..5d353bd7c6 100644 --- a/tests/testinput.c +++ b/tests/testinput.c @@ -104,16 +104,11 @@ configure_event (GtkWidget *widget, GdkEventConfigure *event) } /* Refill the screen from the backing surface */ -static gint -expose_event (GtkWidget *widget, GdkEventExpose *event) +static gboolean +draw (GtkWidget *widget, cairo_t *cr) { - cairo_t *cr = gdk_cairo_create (gtk_widget_get_window (widget)); - cairo_set_source_surface (cr, surface, 0, 0); - gdk_cairo_region (cr, event->region); - cairo_fill (cr); - - cairo_destroy (cr); + cairo_paint (cr); return FALSE; } @@ -325,8 +320,8 @@ main (int argc, char *argv[]) /* Signals used to handle backing surface */ - g_signal_connect (drawing_area, "expose_event", - G_CALLBACK (expose_event), NULL); + g_signal_connect (drawing_area, "draw", + G_CALLBACK (draw), NULL); g_signal_connect (drawing_area, "configure_event", G_CALLBACK (configure_event), NULL); |