vcl/unx/gtk3/gtk3gtkframe.cxx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
New commits: commit d9b746c6393a7c39591ad2334fd6313a988050e6 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Mon Apr 1 13:49:12 2019 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Mon Apr 1 16:31:56 2019 +0200 Resolves: tdf#124411 default dnd to MOVE for internal and COPY for external which what the macosx version appears to also do Change-Id: Icff9cada2c821544d0130e28cc3e3862154a57dc Reviewed-on: https://gerrit.libreoffice.org/70063 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/vcl/unx/gtk3/gtk3gtkframe.cxx b/vcl/unx/gtk3/gtk3gtkframe.cxx index ed9895dabdd2..a1334a1bbfeb 100644 --- a/vcl/unx/gtk3/gtk3gtkframe.cxx +++ b/vcl/unx/gtk3/gtk3gtkframe.cxx @@ -3520,10 +3520,16 @@ gboolean GtkDropTarget::signalDragMotion(GtkWidget *pWidget, GdkDragContext *con GdkModifierType mask; gdk_window_get_pointer(widget_get_window(pWidget), nullptr, nullptr, &mask); + // tdf#124411 default to move if drag originates within LO itself, default + // to copy if it comes from outside, this is similar to srcAndDestEqual + // in macosx DropTarget::determineDropAction equivalent + sal_Int8 nNewDropAction = GtkDragSource::g_ActiveDragSource ? + css::datatransfer::dnd::DNDConstants::ACTION_MOVE : + css::datatransfer::dnd::DNDConstants::ACTION_COPY; + // tdf#109227 if a modifier is held down, default to the matching // action for that modifier combo, otherwise pick the preferred // default from the possible source actions - sal_Int8 nNewDropAction = css::datatransfer::dnd::DNDConstants::ACTION_MOVE; if ((mask & GDK_SHIFT_MASK) && !(mask & GDK_CONTROL_MASK)) nNewDropAction = css::datatransfer::dnd::DNDConstants::ACTION_MOVE; else if ((mask & GDK_CONTROL_MASK) && !(mask & GDK_SHIFT_MASK)) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits