[gtk/wip/carlosg/dnd-gestures-2: 4/4] tests: Keep GdkDrop alive on "ask" action
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/carlosg/dnd-gestures-2: 4/4] tests: Keep GdkDrop alive on "ask" action
- Date: Sun, 5 Jan 2020 19:41:09 +0000 (UTC)
commit 231a67ed411b3636df1785ffa248a9e698d56222
Author: Carlos Garnacho <carlosg gnome org>
Date: Sun Jan 5 20:22:36 2020 +0100
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");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]