From 6b9924db1c565a67bee62efd2a252051ef7831e7 Mon Sep 17 00:00:00 2001 From: Cody Russell Date: Fri, 18 Dec 2009 14:36:37 +0100 Subject: [PATCH] Add delete-event callback to window, use gtk_widget_queue_draw() instead of gtk_widget_draw() --- tests/testoffscreenwindow.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/testoffscreenwindow.c b/tests/testoffscreenwindow.c index a70e36b1ae..161c9c511f 100644 --- a/tests/testoffscreenwindow.c +++ b/tests/testoffscreenwindow.c @@ -64,9 +64,11 @@ main (int argc, char **argv) * changes, also track damage on the offscreen * as done above. */ - gtk_widget_draw (offscreen, NULL); + gtk_widget_queue_draw (offscreen); window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + g_signal_connect (window, "delete-event", + G_CALLBACK (gtk_main_quit), window); da = gtk_drawing_area_new (); gtk_container_add (GTK_CONTAINER (window), da);