Skip to content

Conversation

@selckin
Copy link
Contributor

@selckin selckin commented Oct 8, 2025

Using niri as compositor on both sides resulting in: emulation=wlroots capture=layer-shell

Mouse scrolling works fine in terminals, but only scrolls very small amount in google-chrome (in wayland mode)

Using 'wev' to show events, using the real mouse shows

[ 15: wl_pointer] axis_source: 0 (wheel)
[ 15: wl_pointer] axis_value120: axis: 0 (vertical), value120: 120
[ 15: wl_pointer] axis_relative_direction: axis: 0 (vertical), direction: 0
[ 15: wl_pointer] axis: time: 50410752; axis: 0 (vertical), value: 15.000000

Using the lan-mouse shows:

[ 15: wl_pointer] axis_source: 2 (continuous)
[ 15: wl_pointer] axis_value120: axis: 0 (vertical), value120: 1
[ 15: wl_pointer] axis_relative_direction: axis: 0 (vertical), direction: 0
[ 15: wl_pointer] axis: time: -1913142096; axis: 0 (vertical), value: 20.000000

Without axis_source, scrolling over (pinned) tabs also skips one tab.

…chber#318)

Using niri as compositor on both sides resulting in: emulation=wlroots capture=layer-shell

Mouse scrolling works fine in terminals, but only scrolls very small amount in google-chrome (in wayland mode)

Using 'wev' to show events, using the real mouse shows

[        15:      wl_pointer] axis_source: 0 (wheel)
[        15:      wl_pointer] axis_value120: axis: 0 (vertical), value120: 120
[        15:      wl_pointer] axis_relative_direction: axis: 0 (vertical), direction: 0
[        15:      wl_pointer] axis: time: 50410752; axis: 0 (vertical), value: 15.000000

Using the lan-mouse shows:

[        15:      wl_pointer] axis_source: 2 (continuous)
[        15:      wl_pointer] axis_value120: axis: 0 (vertical), value120: 1
[        15:      wl_pointer] axis_relative_direction: axis: 0 (vertical), direction: 0
[        15:      wl_pointer] axis: time: -1913142096; axis: 0 (vertical), value: 20.000000

Without axis_source, scrolling over (pinned) tabs also skips one tab.
@feschber
Copy link
Owner

feschber commented Oct 8, 2025

It seems like I completely missed the axis_source. I've been wondering, why this was broken.
Thanks a lot!

@feschber feschber merged commit 39b79d8 into feschber:main Oct 8, 2025
7 checks passed
feschber added a commit to feschber/niri that referenced this pull request Oct 27, 2025
The virtual-pointer protocol accepts discrete scroll events, not axis-value120.
Therefore the value received from a client must be multiplied by 120 before
being handed to mutate_axis_frame.

https://gitlab.freedesktop.org/wlroots/wlroots/-/blob/879243e370de6167d2c49510396f937b1a93fab5/types/wlr_virtual_pointer_v1.c#L183
feschber/lan-mouse#318
feschber/lan-mouse#325
feschber/lan-mouse#329
feschber added a commit that referenced this pull request Oct 27, 2025
…e=layer-shell (#318) (#325)"

The division by 120 was correct.
feschber added a commit that referenced this pull request Oct 27, 2025
…e=layer-shell (#318) (#325)" (#334)

The division by 120 was correct.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants