From d396f66bf0bc8d4c777c744efe77ccb5b28b385f Mon Sep 17 00:00:00 2001 From: Neil Date: Thu, 15 Aug 2013 15:13:15 +1000 Subject: Feature: [feature-requests:#1007]. Option to allow mouse selection to switch to rectangular by pressing Alt after start of gesture. From Neomi. --- gtk/ScintillaGTK.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'gtk') diff --git a/gtk/ScintillaGTK.cxx b/gtk/ScintillaGTK.cxx index db9e1ea19..25d61d9f2 100644 --- a/gtk/ScintillaGTK.cxx +++ b/gtk/ScintillaGTK.cxx @@ -1962,7 +1962,10 @@ gint ScintillaGTK::Motion(GtkWidget *widget, GdkEventMotion *event) { //Platform::DebugPrintf("Move %x %x %d %c %d %d\n", // sciThis,event->window,event->time,event->is_hint? 'h' :'.', x, y); Point pt(x, y); - sciThis->ButtonMove(pt); + int modifiers = ((event->state & GDK_SHIFT_MASK) != 0 ? SCI_SHIFT : 0) | + ((event->state & GDK_CONTROL_MASK) != 0 ? SCI_CTRL : 0) | + ((event->state & modifierTranslated(sciThis->rectangularSelectionModifier)) != 0 ? SCI_ALT : 0); + sciThis->ButtonMoveWithModifiers(pt, modifiers); } catch (...) { sciThis->errorStatus = SC_STATUS_FAILURE; } -- cgit v1.2.3