[gtk+/native-layout] Add delete-event callback to window, use gtk_widget_queue_draw() instead of gtk_widget_draw()



commit 6b9924db1c565a67bee62efd2a252051ef7831e7
Author: Cody Russell <crussell canonical com>
Date:   Fri Dec 18 14:36:37 2009 +0100

    Add delete-event callback to window, use gtk_widget_queue_draw() instead of gtk_widget_draw()

 tests/testoffscreenwindow.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/tests/testoffscreenwindow.c b/tests/testoffscreenwindow.c
index a70e36b..161c9c5 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);
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]