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

This commit is contained in:
Cody Russell 2009-12-18 14:36:37 +01:00 committed by Cody Russell
parent 8a523393ac
commit 8801d163a6

View File

@ -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);