add reverse-mouse-scrolling to configure mouse wheel reverse scrolling

This commit is contained in:
Kory Prince 2023-07-01 10:35:37 -05:00
parent 7a01143359
commit 1ba05d1ffa
1 changed files with 2 additions and 1 deletions

View File

@ -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) {