From 35496f461f6afa4b0ae0d07f429817543e98105c Mon Sep 17 00:00:00 2001 From: Kory Prince Date: Sat, 1 Jul 2023 03:09:47 -0500 Subject: [PATCH] fix regression from #2232: reverse-scrolling was not applied to GTK_SCROLL_SMOOTH events --- src/AModule.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/AModule.cpp b/src/AModule.cpp index 1bfb2def..dc866d44 100644 --- a/src/AModule.cpp +++ b/src/AModule.cpp @@ -121,9 +121,9 @@ AModule::SCROLL_DIR AModule::getScrollDir(GdkEventScroll* e) { } if (distance_scrolled_y_ < -threshold) { - dir = SCROLL_DIR::UP; + dir = reverse ? SCROLL_DIR::DOWN : SCROLL_DIR::UP; } else if (distance_scrolled_y_ > threshold) { - dir = SCROLL_DIR::DOWN; + dir = reverse ? SCROLL_DIR::UP : SCROLL_DIR::DOWN; } else if (distance_scrolled_x_ > threshold) { dir = SCROLL_DIR::RIGHT; } else if (distance_scrolled_x_ < -threshold) {