[client] wayland: do not fall back on SDL for scroll events

This commit is contained in:
Tudor Brindus 2021-01-17 01:44:27 -05:00 committed by Geoffrey McRae
parent e7132f757e
commit 842bb59955

View File

@ -147,7 +147,11 @@ 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)
{ {
// Do nothing. int button = value > 0 ?
5 /* SPICE_MOUSE_BUTTON_DOWN */ :
4 /* SPICE_MOUSE_BUTTON_UP */;
app_handleButtonPress(button);
app_handleButtonRelease(button);
} }
static int mapWaylandToSpiceButton(uint32_t button) static int mapWaylandToSpiceButton(uint32_t button)
@ -452,6 +456,7 @@ static bool waylandEventFilter(SDL_Event * event)
case SDL_MOUSEMOTION: case SDL_MOUSEMOTION:
case SDL_MOUSEBUTTONDOWN: case SDL_MOUSEBUTTONDOWN:
case SDL_MOUSEBUTTONUP: case SDL_MOUSEBUTTONUP:
case SDL_MOUSEWHEEL:
return true; return true;
} }