[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.
This commit is contained in:
Quantum 2021-07-30 06:53:09 -04:00 committed by Geoffrey McRae
parent 86b50cc8ab
commit 6b6b3b724a

View File

@ -85,6 +85,9 @@ static void pointerLeaveHandler(void * data, struct wl_pointer * pointer,
static void pointerAxisHandler(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) uint32_t serial, uint32_t axis, wl_fixed_t value)
{ {
if (axis != WL_POINTER_AXIS_VERTICAL_SCROLL)
return;
int button = value > 0 ? int button = value > 0 ?
5 /* SPICE_MOUSE_BUTTON_DOWN */ : 5 /* SPICE_MOUSE_BUTTON_DOWN */ :
4 /* SPICE_MOUSE_BUTTON_UP */; 4 /* SPICE_MOUSE_BUTTON_UP */;