[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/unx
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Thu Apr 4 09:27:35 UTC 2019
vcl/unx/gtk3/gtk3gtkframe.cxx | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
New commits:
commit eaaec2de4eef3fd283f387d2d5888a6d4f46c25b
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon Apr 1 13:49:12 2019 +0100
Commit: Xisco Faulí <xiscofauli at libreoffice.org>
CommitDate: Thu Apr 4 11:27:03 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/70064
Tested-by: Jenkins
Reviewed-by: Xisco Faulí <xiscofauli at libreoffice.org>
diff --git a/vcl/unx/gtk3/gtk3gtkframe.cxx b/vcl/unx/gtk3/gtk3gtkframe.cxx
index f8e629037820..184102e74b17 100644
--- a/vcl/unx/gtk3/gtk3gtkframe.cxx
+++ b/vcl/unx/gtk3/gtk3gtkframe.cxx
@@ -3665,10 +3665,16 @@ gboolean GtkSalFrame::signalDragMotion(GtkWidget *pWidget, GdkDragContext *conte
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))
More information about the Libreoffice-commits
mailing list