From 6b6b3b724a5b3ee827af400faf08b5964efb0296 Mon Sep 17 00:00:00 2001 From: Quantum Date: Fri, 30 Jul 2021 06:53:09 -0400 Subject: [PATCH] [client] wayland: reject horizontal scroll events Currently, we handle horizontal scroll events as if they are vertical scrolls. This is not correct and we should instead reject them. --- client/displayservers/Wayland/input.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/client/displayservers/Wayland/input.c b/client/displayservers/Wayland/input.c index 5fce571b..7dd565a2 100644 --- a/client/displayservers/Wayland/input.c +++ b/client/displayservers/Wayland/input.c @@ -85,6 +85,9 @@ static void pointerLeaveHandler(void * data, struct wl_pointer * pointer, static void pointerAxisHandler(void * data, struct wl_pointer * pointer, uint32_t serial, uint32_t axis, wl_fixed_t value) { + if (axis != WL_POINTER_AXIS_VERTICAL_SCROLL) + return; + int button = value > 0 ? 5 /* SPICE_MOUSE_BUTTON_DOWN */ : 4 /* SPICE_MOUSE_BUTTON_UP */;