summaryrefslogtreecommitdiff
path: root/src/managers/KeybindManager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/managers/KeybindManager.cpp')
-rw-r--r--src/managers/KeybindManager.cpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/managers/KeybindManager.cpp b/src/managers/KeybindManager.cpp
index efeb2a07..c58ae7b6 100644
--- a/src/managers/KeybindManager.cpp
+++ b/src/managers/KeybindManager.cpp
@@ -258,16 +258,20 @@ bool CKeybindManager::onAxisEvent(wlr_pointer_axis_event* e) {
bool found = false;
if (e->source == WLR_AXIS_SOURCE_WHEEL && e->orientation == WLR_AXIS_ORIENTATION_VERTICAL) {
- if (e->delta < 0) {
+ if (e->delta < 0)
found = handleKeybinds(MODS, "mouse_down", 0, 0, true, 0);
- } else {
+ else
found = handleKeybinds(MODS, "mouse_up", 0, 0, true, 0);
- }
-
- if (found)
- shadowKeybinds();
+ } else if (e->source == WLR_AXIS_SOURCE_WHEEL && e->orientation == WLR_AXIS_ORIENTATION_HORIZONTAL) {
+ if (e->delta < 0)
+ found = handleKeybinds(MODS, "mouse_left", 0, 0, true, 0);
+ else
+ found = handleKeybinds(MODS, "mouse_right", 0, 0, true, 0);
}
+ if (found)
+ shadowKeybinds();
+
return !found;
}