aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--gtk/ScintillaGTK.cxx11
1 files changed, 7 insertions, 4 deletions
diff --git a/gtk/ScintillaGTK.cxx b/gtk/ScintillaGTK.cxx
index 9b7a0baae..5dc998a07 100644
--- a/gtk/ScintillaGTK.cxx
+++ b/gtk/ScintillaGTK.cxx
@@ -2329,14 +2329,17 @@ void ScintillaGTK::DragBegin(GtkWidget *, GdkDragContext *) {
}
gboolean ScintillaGTK::DragMotion(GtkWidget *widget, GdkDragContext *context,
- gint x, gint y, guint dragtime) {
+ gint x, gint y, guint dragtime) {
ScintillaGTK *sciThis = ScintillaFromWidget(widget);
- //Platform::DebugPrintf("DragMotion %d %d %x %x %x\n", x, y,
- // context->actions, context->suggested_action, sciThis);
Point npt(x, y);
sciThis->inDragDrop = true;
sciThis->SetDragPosition(sciThis->PositionFromLocation(npt));
- gdk_drag_status(context, context->suggested_action, dragtime);
+ GdkDragAction preferredAction = context->suggested_action;
+ if (context->actions == static_cast<GdkDragAction>
+ (GDK_ACTION_COPY | GDK_ACTION_MOVE)) {
+ preferredAction = GDK_ACTION_MOVE;
+ }
+ gdk_drag_status(context, preferredAction, dragtime);
return FALSE;
}