From 1ba05d1ffa00014497fafbf84617ed135b4f6cdc Mon Sep 17 00:00:00 2001 From: Kory Prince Date: Sat, 1 Jul 2023 10:35:37 -0500 Subject: [PATCH] add reverse-mouse-scrolling to configure mouse wheel reverse scrolling --- src/AModule.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/AModule.cpp b/src/AModule.cpp index 76999e1d..b84f551a 100644 --- a/src/AModule.cpp +++ b/src/AModule.cpp @@ -99,11 +99,12 @@ bool AModule::handleToggle(GdkEventButton* const& e) { AModule::SCROLL_DIR AModule::getScrollDir(GdkEventScroll* e) { // only affects up/down bool reverse = config_["reverse-scrolling"].asBool(); + bool reverse_mouse = config_["reverse-mouse-scrolling"].asBool(); // ignore reverse-scrolling if event comes from a mouse wheel GdkDevice* device = gdk_event_get_source_device((GdkEvent *)e); if (device != NULL && gdk_device_get_source(device) == GDK_SOURCE_MOUSE) { - reverse = false; + reverse = reverse_mouse; } switch (e->direction) {