From 067151f66d792599e35aa7964ade16df0802abae Mon Sep 17 00:00:00 2001 From: Neil Hodgson Date: Wed, 2 Aug 2017 16:10:59 +1000 Subject: Backport: Switch default modifier key for rectangular selections from Ctrl to Alt on Linux. Backport of changeset 6364:ea9f62ea6153. --- doc/ScintillaDoc.html | 6 +++--- doc/ScintillaHistory.html | 6 ++++++ gtk/ScintillaGTK.cxx | 4 ---- qt/ScintillaEditBase/ScintillaQt.cpp | 4 ---- 4 files changed, 9 insertions(+), 11 deletions(-) diff --git a/doc/ScintillaDoc.html b/doc/ScintillaDoc.html index 2c2d5b3ae..dca0c72f3 100644 --- a/doc/ScintillaDoc.html +++ b/doc/ScintillaDoc.html @@ -1649,9 +1649,9 @@ struct Sci_TextToFind {

SCI_SETRECTANGULARSELECTIONMODIFIER(int modifier)
SCI_GETRECTANGULARSELECTIONMODIFIER → int
- On GTK+, the key used to indicate that a rectangular selection should be created when combined with a mouse drag can be set. - The three possible values are SCMOD_CTRL=2 (default), SCMOD_ALT=4 or SCMOD_SUPER=8. - Since SCMOD_ALT is often already used by a window manager, the window manager may need configuring to allow this choice. + On GTK+ and Qt, the key used to indicate that a rectangular selection should be created when combined with a mouse drag can be set. + The three possible values are SCMOD_CTRL=2, SCMOD_ALT=4 (default) or SCMOD_SUPER=8. + Since SCMOD_ALT may already be used by a window manager, the window manager may need configuring to allow this choice. SCMOD_SUPER is often a system dependent modifier key such as the Left Windows key on a Windows keyboard or the Command key on a Mac.

diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html index eff7e5534..4b8cc6dd2 100644 --- a/doc/ScintillaHistory.html +++ b/doc/ScintillaHistory.html @@ -567,6 +567,12 @@ Bug #1876.
  • + On Linux, both for GTK+ and Qt, the default modifier key for rectangular selection is now Alt. + This is the same as Windows and macOS. + This was changed from Ctrl as window managers are less likely to intercept Alt+Drag for + moving windows than in the past. +
  • +
  • On Cocoa, fix doCommandBySelector but avoid double effect of 'delete' key. Bug #1958. diff --git a/gtk/ScintillaGTK.cxx b/gtk/ScintillaGTK.cxx index 0cbf83652..1e3d68320 100644 --- a/gtk/ScintillaGTK.cxx +++ b/gtk/ScintillaGTK.cxx @@ -177,11 +177,7 @@ ScintillaGTK::ScintillaGTK(_ScintillaObject *sci_) : sci = sci_; wMain = GTK_WIDGET(sci); -#if PLAT_GTK_WIN32 rectangularSelectionModifier = SCMOD_ALT; -#else - rectangularSelectionModifier = SCMOD_CTRL; -#endif #if PLAT_GTK_WIN32 // There does not seem to be a real standard for indicating that the clipboard diff --git a/qt/ScintillaEditBase/ScintillaQt.cpp b/qt/ScintillaEditBase/ScintillaQt.cpp index 73319bda8..6a119ebd9 100644 --- a/qt/ScintillaEditBase/ScintillaQt.cpp +++ b/qt/ScintillaEditBase/ScintillaQt.cpp @@ -130,11 +130,7 @@ static ScintillaRectangularMime *singletonMime = 0; void ScintillaQt::Init() { -#if defined(Q_OS_WIN) || defined(Q_OS_MAC) rectangularSelectionModifier = SCMOD_ALT; -#else - rectangularSelectionModifier = SCMOD_CTRL; -#endif #if defined(Q_OS_MAC) && QT_VERSION < QT_VERSION_CHECK(5, 0, 0) if (!singletonMime) { -- cgit v1.2.3