[wl_pointer.axis_value120] Firefox does not support high resolution scrollwheels in Wayland mode
Categories
(Core :: Widget: Gtk, enhancement)
Tracking
()
Tracking | Status | |
---|---|---|
firefox133 | --- | fixed |
People
(Reporter: kode54, Assigned: stransky)
References
(Blocks 1 open bug)
Details
Attachments
(2 files)
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/116.0
Steps to reproduce:
- Install Firefox Nightly.
- Run it with MOZ_USE_XINPUT2=1 set and GDK_CORE_DEVICE_EVENTS unset.
- Browser runs in Wayland mode.
Actual results:
My MX Master 3 is locked to large wheel steps, under GNOME, Plasma, and wlroots compositors.
Expected results:
My mouse's reported high precision scrolling events should trigger fine scrolling in the browser.
This problem does not occur if I force it to run under Xwayland and enable the xinput2 mode.
Comment 2•1 year ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::Widget: Gtk' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Comment 3•1 year ago
|
||
Does this happen with other GTK applications?
Assignee | ||
Comment 4•1 year ago
|
||
Seems to be implemented in wayland 1.21 by wl_pointer.axis_value120 interface (https://lists.freedesktop.org/archives/wayland-devel/2022-May/042194.html). It should be implemented by somehow who owns such hardware.
Assignee | ||
Comment 5•1 year ago
|
||
(In reply to Emilio Cobos Álvarez (:emilio) from comment #3)
Does this happen with other GTK applications?
I guess it's Gtk4 only.
Comment 6•1 year ago
|
||
+1 for this bug. Running Fedora 39 using the Wayland session. On x11, firefox notices the high resolution scroll events and behaves as expected. Using Wayland, firefox only scrolls on the low resolution event. Trackpad scrolling is smooth as expected on both. Aside from firefox, only gtk3 apps do not use the high resolution scroll, everything works on gtk4, chrome (wayland and x11), electron...
To reproduce this bug without the required hardware, you could possibly use libinput-config (https://gitlab.com/warningnonpotablewater/libinput-config) and set discrete-scroll-factor-y=0.125
Comment 7•8 months ago
|
||
(In reply to Martin Stránský [:stransky] (ni? me) from comment #4)
Seems to be implemented in wayland 1.21 by wl_pointer.axis_value120 interface (https://lists.freedesktop.org/archives/wayland-devel/2022-May/042194.html). It should be implemented by somehow who owns such hardware.
I own relevant hardware and am in need of this feature; do you have any pointers (for someone familiar with the concepts, but unfamiliar with the codebase) where to start implementing?
Assignee | ||
Comment 8•8 months ago
|
||
This may be related:
https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/652
I'm not sure how it's integrated with Gtk3 (Firefox uses Gtk3 toolkit to get mouse events).
Assignee | ||
Comment 9•8 months ago
|
||
Looks like it was merged to Gtk4 only. We'd need Gtk3 packport for it.
https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/3839
Comment 11•4 months ago
|
||
I want to correct one observation. As I observed in bug 1902839:
Page scrolls once per 7~8 EV_REL / REL_WHEEL_HI_RES events by same amount as with mouse with normal wheel. When scrolling slowly, one hires event is 16° in my case. FF scrolling is not synchronous to EV_REL / REL_WHEEL (non high resolution) events, so it looks like input stack is processing hires events, but it somehow pre-scales them and then scrolls in coarser steps.
Impact of this fact is quite annoying. When I focus FF and scroll wheel is not aligned, then enable ratcheting on the mouse, not every "click" of the wheel produces 1 step of page scroll. Some wheel "clicks" result in none and other in 2 scroll steps in FF.
I will attach libinput recording file, yo you can replay it on your systems.
Comment 12•4 months ago
|
||
libinput record
output for Logitech master 3S scrolling:
- scroll down
- scroll up
- scroll down,
- repeated very short scrolls up/down
Assignee | ||
Comment 14•29 days ago
|
||
Updated•29 days ago
|
Assignee | ||
Comment 15•26 days ago
|
||
Botond, for the smooth/hi-res scroll we use right now:
WidgetWheelEvent wheelEvent(true, eWheel, this);
wheelEvent.mDeltaMode = dom::WheelEvent_Binding::DOM_DELTA_LINE;
wheelEvent.mDeltaX = aDeltaX * 3;
wheelEvent.mDeltaY = aDeltaY * 3;
wheelEvent.mWheelTicksX = aDeltaX;
wheelEvent.mWheelTicksY = aDeltaY;
wheelEvent.mIsNoLineOrPageDelta = true;
I wonder if there's any other settings we may use, close to touch scroll perhaps?
Thanks.
Comment 16•23 days ago
|
||
Comment 17•23 days ago
|
||
Backed out for causing bc failures @ browser_disableSwipeGestures.js
Backout link: https://hg.mozilla.org/integration/autoland/rev/a762b5fe92d9c9097ad08857c5b5c7457f2e8e56
Comment 19•19 days ago
|
||
Comment 20•18 days ago
|
||
bugherder |
Comment 21•15 days ago
|
||
(In reply to Martin Stránský [:stransky] (ni? me) from comment #15)
Botond, for the smooth/hi-res scroll we use right now:
WidgetWheelEvent wheelEvent(true, eWheel, this); wheelEvent.mDeltaMode = dom::WheelEvent_Binding::DOM_DELTA_LINE; wheelEvent.mDeltaX = aDeltaX * 3; wheelEvent.mDeltaY = aDeltaY * 3; wheelEvent.mWheelTicksX = aDeltaX; wheelEvent.mWheelTicksY = aDeltaY; wheelEvent.mIsNoLineOrPageDelta = true;
I wonder if there's any other settings we may use, close to touch scroll perhaps?
Apologies for the delay.
I assume you mean touchpad rather than touchscreen, since touchpad seems like the closer analogue to hi-res mousewheel (for touchscreen, the logic is a more simple "the page moves as much as your finger did").
The only thing that comes to mind is perhaps using the method of computing deltas for a touchpad here (with the delta type being set to DOM_DELTA_PIXEL
or DOM_DELTA_PAGE
depending on isPageMode
).
I don't have a good sense of how much of an improvement that would be in practice.
Updated•8 days ago
|
Updated•2 days ago
|
Description
•