diff options
author | Corey Berla <corey@berla.me> | 2022-11-17 13:34:24 -0800 |
---|---|---|
committer | Corey Berla <corey@berla.me> | 2022-12-15 17:45:00 +0000 |
commit | a2ef3022b9cd1c0cef61c1183e698cf406715bea (patch) | |
tree | 6e326d28e2d572ac209518070d8dea9ef45ea0d5 | |
parent | fede594335ab27ce254ebf780323d52e83e4da5c (diff) | |
download | nautilus-a2ef3022b9cd1c0cef61c1183e698cf406715bea.tar.gz |
list-base: Fix non-local DnD in x11
We are using a workaround to get the preferred action in x11
where we check the preferred action of the drag. This works for local
drags, but obviously not non-local drags. The workaround is necessary
because of a bug in gtk. Let's just default back to COPY for non-local
drags.
-rw-r--r-- | src/nautilus-list-base.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nautilus-list-base.c b/src/nautilus-list-base.c index 93c20ccd3..d19bb65f6 100644 --- a/src/nautilus-list-base.c +++ b/src/nautilus-list-base.c @@ -866,7 +866,7 @@ on_item_drop (GtkDropTarget *target, * is merged. Without this fix, the preferred action isn't set correctly. * https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/4982 */ GdkDrag *drag = gdk_drop_get_drag (gtk_drop_target_get_current_drop (target)); - actions = gdk_drag_get_selected_action (drag); + actions = drag != NULL ? gdk_drag_get_selected_action (drag) : GDK_ACTION_COPY; } #endif @@ -964,7 +964,7 @@ on_view_drop (GtkDropTarget *target, * is merged. Without this fix, the preferred action isn't set correctly. * https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/4982 */ GdkDrag *drag = gdk_drop_get_drag (gtk_drop_target_get_current_drop (target)); - actions = gdk_drag_get_selected_action (drag); + actions = drag != NULL ? gdk_drag_get_selected_action (drag) : GDK_ACTION_COPY; } #endif |