Commit 23b9b9fc authored by Alberto Fanjul's avatar Alberto Fanjul

dnd: Enable Drag&Drop on wayland

parent 143ab660
Pipeline #102103 passed with stages
in 2 minutes and 9 seconds
......@@ -461,7 +461,7 @@ _glade_adaptor_chooser_widget_constructed (GObject *object)
chooser, NULL);
/* Enable Drag & Drop */
gtk_tree_view_enable_model_drag_source (priv->treeview, GDK_BUTTON1_MASK,
_glade_dnd_get_target (), 1, 0);
_glade_dnd_get_target (), 1, GDK_ACTION_MOVE | GDK_ACTION_COPY);
g_signal_connect_after (priv->treeview, "drag-begin",
G_CALLBACK (glade_adaptor_chooser_widget_drag_begin),
NULL);
......
......@@ -446,7 +446,7 @@ glade_design_layout_motion_notify_event (GtkWidget *widget, GdkEventMotion *ev)
if (target == NULL)
target = gtk_target_list_new (_glade_dnd_get_target (), 1);
gtk_drag_begin_with_coordinates (widget, target, 0, 1, (GdkEvent*)ev, x, y);
gtk_drag_begin_with_coordinates (widget, target, GDK_ACTION_MOVE | GDK_ACTION_COPY, 1, (GdkEvent*)ev, x, y);
return TRUE;
}
......
......@@ -35,7 +35,7 @@ _glade_dnd_get_target (void)
void
_glade_dnd_dest_set (GtkWidget *target)
{
gtk_drag_dest_set (target, 0, _glade_dnd_get_target (), 1, GDK_ACTION_COPY);
gtk_drag_dest_set (target, 0, _glade_dnd_get_target (), 1, GDK_ACTION_MOVE | GDK_ACTION_COPY);
}
GObject *
......
......@@ -602,7 +602,7 @@ glade_inspector_init (GladeInspector *inspector)
/* Set it as a drag source */
gtk_tree_view_enable_model_drag_source (GTK_TREE_VIEW (priv->view),
GDK_BUTTON1_MASK,
_glade_dnd_get_target (), 1, 0);
_glade_dnd_get_target (), 1, GDK_ACTION_MOVE | GDK_ACTION_COPY);
g_signal_connect (G_OBJECT (priv->view), "row-activated",
G_CALLBACK (item_activated_cb), inspector);
......
......@@ -344,7 +344,7 @@ glade_palette_new_item (GladePalette *palette, GladeWidgetAdaptor *adaptor)
g_signal_connect_object (button, "drag-data-get",
G_CALLBACK (glade_palette_drag_data_get), adaptor, 0);
gtk_drag_source_set (button, GDK_BUTTON1_MASK, _glade_dnd_get_target (), 1, 0);
gtk_drag_source_set (button, GDK_BUTTON1_MASK, _glade_dnd_get_target (), 1, GDK_ACTION_MOVE | GDK_ACTION_COPY);
gtk_widget_show (item);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment