Fix duplicate scroll events

This commit is contained in:
Friz64 2024-02-25 17:37:36 +01:00
parent 7b6aead9fb
commit 7ca8474604
2 changed files with 30 additions and 1 deletions

View File

@ -135,7 +135,7 @@ static void registryHandleGlobal(void* userData,
{ {
_glfw.wl.seat = _glfw.wl.seat =
wl_registry_bind(registry, name, &wl_seat_interface, wl_registry_bind(registry, name, &wl_seat_interface,
_glfw_min(4, version)); _glfw_min(5, version));
_glfwAddSeatListenerWayland(_glfw.wl.seat); _glfwAddSeatListenerWayland(_glfw.wl.seat);
} }
} }

View File

@ -1622,6 +1622,31 @@ static void pointerHandleAxis(void* userData,
_glfwInputScroll(window, 0.0, -wl_fixed_to_double(value) / 10.0); _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 = static const struct wl_pointer_listener pointerListener =
{ {
pointerHandleEnter, pointerHandleEnter,
@ -1629,6 +1654,10 @@ static const struct wl_pointer_listener pointerListener =
pointerHandleMotion, pointerHandleMotion,
pointerHandleButton, pointerHandleButton,
pointerHandleAxis, pointerHandleAxis,
pointerHandleFrame,
pointerHandleAxisSource,
pointerHandleAxisStop,
pointerHandleAxisDiscrete,
}; };
static void keyboardHandleKeymap(void* userData, static void keyboardHandleKeymap(void* userData,