[gtk/dnd-gestures-2: 43/100] window: Port to GtkDragDest
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/dnd-gestures-2: 43/100] window: Port to GtkDragDest
- Date: Mon, 6 Jan 2020 21:17:43 +0000 (UTC)
commit 6e8cd78c1a7fc1b9a0605288ee5969b3e823915d
Author: Matthias Clasen <mclasen redhat com>
Date: Wed Jan 1 23:28:33 2020 -0500
window: Port to GtkDragDest
gtk/gtkwindow.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index 10dd3436bb..0422043dfc 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -1783,6 +1783,7 @@ gtk_window_init (GtkWindow *window)
GtkEventController *motion_controller;
#ifdef GDK_WINDOWING_X11
GdkContentFormats *targets;
+ GtkDropTarget *dest;
#endif
widget = GTK_WIDGET (window);
@@ -1837,11 +1838,9 @@ gtk_window_init (GtkWindow *window)
#ifdef GDK_WINDOWING_X11
targets = gdk_content_formats_new (dnd_dest_targets, G_N_ELEMENTS (dnd_dest_targets));
- gtk_drag_dest_set (GTK_WIDGET (window),
- GTK_DEST_DEFAULT_MOTION | GTK_DEST_DEFAULT_DROP,
- targets,
- GDK_ACTION_MOVE);
+ dest = gtk_drop_target_new ( GTK_DEST_DEFAULT_MOTION | GTK_DEST_DEFAULT_DROP, targets, GDK_ACTION_MOVE);
gdk_content_formats_unref (targets);
+ gtk_drop_target_attach (dest, GTK_WIDGET (window));
#endif
seat = gdk_display_get_default_seat (gtk_widget_get_display (widget));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]