summaryrefslogtreecommitdiff
path: root/demos/gtk-demo/dnd.c
diff options
context:
space:
mode:
Diffstat (limited to 'demos/gtk-demo/dnd.c')
-rw-r--r--demos/gtk-demo/dnd.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/demos/gtk-demo/dnd.c b/demos/gtk-demo/dnd.c
index 30bae48e17..fd26c9e77a 100644
--- a/demos/gtk-demo/dnd.c
+++ b/demos/gtk-demo/dnd.c
@@ -438,9 +438,7 @@ do_dnd (GtkWidget *do_widget)
gtk_widget_get_display (do_widget));
gtk_window_set_title (GTK_WINDOW (window), "Drag-and-Drop");
gtk_window_set_default_size (GTK_WINDOW (window), 640, 480);
-
- g_signal_connect (window, "destroy",
- G_CALLBACK (gtk_widget_destroyed), &window);
+ g_object_add_weak_pointer (G_OBJECT (window), (gpointer *)&window);
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
gtk_window_set_child (GTK_WINDOW (window), box);