From 231a67ed411b3636df1785ffa248a9e698d56222 Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Sun, 5 Jan 2020 20:22:36 +0100 Subject: tests: Keep GdkDrop alive on "ask" action The GdkDrop is automatically destroyed on drag end, but "ask" actions require it to live longer, so the popover can fiddle with it later on. --- tests/testdnd2.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/testdnd2.c b/tests/testdnd2.c index 2264c3b749..ef09a72e1e 100644 --- a/tests/testdnd2.c +++ b/tests/testdnd2.c @@ -124,6 +124,10 @@ ask_actions (GdkDrop *drop, GtkWidget *popover, *box, *button; popover = gtk_popover_new (image); + g_object_set_data_full (G_OBJECT (popover), "drop-data", + g_object_ref (drop), + (GDestroyNotify) g_object_unref); + box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0); gtk_container_add (GTK_CONTAINER (popover), box); button = gtk_button_new_with_label ("Copy"); -- cgit v1.2.1