From ba0d049480607109f6eb47d1fa8ccb2b549c9334 Mon Sep 17 00:00:00 2001 From: Colomban Wendling Date: Tue, 21 Feb 2017 23:08:50 +0100 Subject: Bug [#1901]. GTK: Fix double scrolling under X11 Really restrict smooth scrolling handling to Wayland. --- gtk/ScintillaGTK.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gtk') 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;; -- cgit v1.2.3