From 7ca84746041b60c1f2a5e40714425e03710da38a Mon Sep 17 00:00:00 2001 From: Friz64 Date: Sun, 25 Feb 2024 17:37:36 +0100 Subject: [PATCH] Fix duplicate scroll events --- src/wl_init.c | 2 +- src/wl_window.c | 29 +++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/src/wl_init.c b/src/wl_init.c index 3aff476d..c4ea4604 100644 --- a/src/wl_init.c +++ b/src/wl_init.c @@ -135,7 +135,7 @@ static void registryHandleGlobal(void* userData, { _glfw.wl.seat = wl_registry_bind(registry, name, &wl_seat_interface, - _glfw_min(4, version)); + _glfw_min(5, version)); _glfwAddSeatListenerWayland(_glfw.wl.seat); } } diff --git a/src/wl_window.c b/src/wl_window.c index 5b491ffb..f6b64bbc 100644 --- a/src/wl_window.c +++ b/src/wl_window.c @@ -1622,6 +1622,31 @@ static void pointerHandleAxis(void* userData, _glfwInputScroll(window, 0.0, -wl_fixed_to_double(value) / 10.0); } +static void pointerHandleFrame(void* userData, + struct wl_pointer* pointer) +{ +} + +static void pointerHandleAxisSource(void* userData, + struct wl_pointer* pointer, + uint32_t axis_source) +{ +} + +static void pointerHandleAxisStop(void* userData, + struct wl_pointer* pointer, + uint32_t time, + uint32_t axis) +{ +} + +static void pointerHandleAxisDiscrete(void* userData, + struct wl_pointer* pointer, + uint32_t axis, + int32_t discrete) +{ +} + static const struct wl_pointer_listener pointerListener = { pointerHandleEnter, @@ -1629,6 +1654,10 @@ static const struct wl_pointer_listener pointerListener = pointerHandleMotion, pointerHandleButton, pointerHandleAxis, + pointerHandleFrame, + pointerHandleAxisSource, + pointerHandleAxisStop, + pointerHandleAxisDiscrete, }; static void keyboardHandleKeymap(void* userData,