forked from AuroraMiddleware/gtk
window: Port to GtkDragDest
This commit is contained in:
parent
6e602e052b
commit
802c7975e2
@ -1784,6 +1784,7 @@ gtk_window_init (GtkWindow *window)
|
||||
GtkEventController *motion_controller;
|
||||
#ifdef GDK_WINDOWING_X11
|
||||
GdkContentFormats *targets;
|
||||
GtkDropTarget *dest;
|
||||
#endif
|
||||
|
||||
widget = GTK_WIDGET (window);
|
||||
@ -1838,11 +1839,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));
|
||||
|
Loading…
Reference in New Issue
Block a user