Skip to content

Conversation

ids1024
Copy link
Member

@ids1024 ids1024 commented Oct 7, 2025

This can be tested with the application example, looking at the events shown for mouse wheel movement.

wl_pointer::axis_discrete isn't sent in version 8 or higher of wl_pointer. And sctk doesn't convert the value120 events, so on compositors advertising version 8, only pixel scroll events were being sent.

This sends MouseScrollDelta::LineDelta with a fractional value, without doing any accumulation. Given LineDelta contains f32 values, this presumably is expected?

Though it might be good to change the definition of MouseScrollDelta to include both discrete and pixel values, when the compositor sends both. I'm not familiar with how this works on non-Wayland backends though.

  • Tested on all platforms changed
  • Added an entry to the changelog module if knowledge of this change could be valuable to users
  • Updated documentation to reflect any user-facing changes, including notes of platform-specific behavior
  • Created or updated an example program if it would help users understand this functionality

This can be tested with the `application` example, looking at the events
shown for mouse wheel movement.

`wl_pointer::axis_discrete` isn't sent in version 8 or higher of
`wl_pointer`. And `sctk` doesn't convert the `value120` events, so
on compositors advertising version 8, only pixel scroll events were
being sent.

This sends `MouseScrollDelta::LineDelta` with a fractional value,
without doing any accumulation. Given `LineDelta` contains `f32` values,
this presumably is expected?

Though it might be good to change the definition of `MouseScrollDelta`
to include both discrete and pixel values, when the compositor sends
both. I'm not familiar with how this works on non-Wayland backends
though.
@ids1024 ids1024 requested a review from kchibisov as a code owner October 7, 2025 23:17
@kchibisov
Copy link
Member

This sends MouseScrollDelta::LineDelta with a fractional value, without doing any accumulation. Given LineDelta contains f32 values, this presumably is expected?

I think so. We can address it later on, it's not a big deal to add accumulation if it's actually expected, since from what I can read, it should be ok from the API stand point, since nothing stops from reporting e.g. half a line.

@kchibisov kchibisov merged commit 2ede84a into rust-windowing:master Oct 8, 2025
57 checks passed
@ids1024 ids1024 deleted the value120 branch October 9, 2025 01:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants