aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorColomban Wendling <ban@herbesfolles.org>2017-02-21 23:08:50 +0100
committerColomban Wendling <ban@herbesfolles.org>2017-02-21 23:08:50 +0100
commitba0d049480607109f6eb47d1fa8ccb2b549c9334 (patch)
tree80a74e503383d91bd66df3a7dc18dea4860436fd
parent1fc84eaf1f424565ae6f47f3a0590cfc89c31da5 (diff)
downloadscintilla-mirror-ba0d049480607109f6eb47d1fa8ccb2b549c9334.tar.gz
Bug [#1901]. GTK: Fix double scrolling under X11
Really restrict smooth scrolling handling to Wayland.
-rw-r--r--doc/ScintillaHistory.html12
-rw-r--r--gtk/ScintillaGTK.cxx2
2 files changed, 13 insertions, 1 deletions
diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html
index b9be13f0f..457f34b6e 100644
--- a/doc/ScintillaHistory.html
+++ b/doc/ScintillaHistory.html
@@ -520,6 +520,18 @@
</li>
</ul>
<h3>
+ <a href="http://www.scintilla.org/scite374.zip">Release 3.7.4</a>
+ </h3>
+ <ul>
+ <li>
+ Released 19 February 2017.
+ </li>
+ <li>
+ Fix to prevent double scrolling on GTK+ with X11.
+ <a href="http://sourceforge.net/p/scintilla/bugs/1901/">Bug #1901</a>.
+ </li>
+ </ul>
+ <h3>
<a href="http://www.scintilla.org/scite373.zip">Release 3.7.3</a>
</h3>
<ul>
diff --git a/gtk/ScintillaGTK.cxx b/gtk/ScintillaGTK.cxx
index 993aa8fbd..f201b5cfe 100644
--- a/gtk/ScintillaGTK.cxx
+++ b/gtk/ScintillaGTK.cxx
@@ -1801,7 +1801,7 @@ gint ScintillaGTK::ScrollEvent(GtkWidget *widget, GdkEventScroll *event) {
return FALSE;
#if defined(GDK_WINDOWING_WAYLAND)
- if (event->direction == GDK_SCROLL_SMOOTH) {
+ if (event->direction == GDK_SCROLL_SMOOTH && GDK_IS_WAYLAND_WINDOW(event->window)) {
const int smoothScrollFactor = 4;
sciThis->smoothScrollY += event->delta_y * smoothScrollFactor;
sciThis->smoothScrollX += event->delta_x * smoothScrollFactor;;