Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix duplicate scroll events #2499

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/wl_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down
29 changes: 29 additions & 0 deletions src/wl_window.c
Original file line number Diff line number Diff line change
Expand Up @@ -1622,13 +1622,42 @@ 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,
pointerHandleLeave,
pointerHandleMotion,
pointerHandleButton,
pointerHandleAxis,
pointerHandleFrame,
pointerHandleAxisSource,
pointerHandleAxisStop,
pointerHandleAxisDiscrete,
};

static void keyboardHandleKeymap(void* userData,
Expand Down