From 3bfd64a8815c20ea44c01ca0c5f9c86f5a9c491b Mon Sep 17 00:00:00 2001 From: DreamMaoMao <2523610504@qq.com> Date: Tue, 4 Mar 2025 13:28:21 +0800 Subject: [PATCH] opt: distinguish between vertical and horizontal roller rolling --- maomao.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/maomao.c b/maomao.c index 0cfa08a4..2b2d3e7d 100644 --- a/maomao.c +++ b/maomao.c @@ -1839,10 +1839,10 @@ axisnotify(struct wl_listener *listener, void *data) { // 获取当前按键的mask,比如alt+super或者alt+ctrl mods = keyboard ? wlr_keyboard_get_modifiers(keyboard) : 0; - // if (event->orientation == WLR_AXIS_ORIENTATION_VERTICAL) + if (event->orientation == WL_POINTER_AXIS_VERTICAL_SCROLL) adir = event->delta > 0 ? AxisDown : AxisUp; - // else - // adir = event->delta > 0 ? AxisRight : AxisLeft; + else + adir = event->delta > 0 ? AxisRight : AxisLeft; for (ji = 0; ji < config.axis_bindings_count; ji++) { if (config.axis_bindings_count < 1)