From ced056eea66e1fad36c10c7da4ff06cf96ad4124 Mon Sep 17 00:00:00 2001 From: JJones780 Date: Fri, 5 Apr 2019 02:57:25 -0600 Subject: [PATCH] put back a check that might be useful for some hardware/GTK combinations. --- src/gui/inputdevices/InputSequence.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/gui/inputdevices/InputSequence.cpp b/src/gui/inputdevices/InputSequence.cpp index 7567f119..2825a555 100644 --- a/src/gui/inputdevices/InputSequence.cpp +++ b/src/gui/inputdevices/InputSequence.cpp @@ -13,6 +13,7 @@ #include "model/Point.h" #include +#include InputSequence::InputSequence(NewGtkInputDevice* inputHandler) @@ -153,6 +154,13 @@ void InputSequence::handleScrollEvent() // scrolling changes window relative coordinates // see github Gnome/evince@1adce5486b10e763bed869 + // GTK handles event compression/filtering differently between versions - this may be needed on certain hardware/GTK combinations. + if (std::abs(lastMousePositionX - rootX) < 0.1 && std::abs( lastMousePositionY - rootY) < 0.1 ) + { + return; + } + + if (scrollOffsetX == 0 && scrollOffsetY == 0) { scrollOffsetX = lastMousePositionX - rootX;