touchpad_scroll_speed is ignored for touchpads (get_scroll_speed checks for TABLET_PAD)
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 86/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- cpp
- Domain
- operating-systems
Research direction
Start in src/core/seat/pointing-device.cpp at wf::pointing_device_t::get_scroll_speed() and its caller, wf::pointer_t::handle_pointer_axis(). Check the device-type and finger-source handling described in the issue, then verify that touchpad_scroll_speed affects two-finger scrolling while mouse_scroll_speed continues to affect wheel scrolling.
Written by the indexing model from the issue text.
Description
input/touchpad_scroll_speed has no effect on touchpad (two-finger) scrolling.
Version: Wayfire 0.11.0 (Arch wayfire 0.11.0-1), and the same code is on master.
Cause: wf::pointing_device_t::get_scroll_speed() in src/core/seat/pointing-device.cpp:
double wf::pointing_device_t::get_scroll_speed(wlr_input_device *dev, bool touchpad)
{
if ((touchpad && (dev->type != WLR_INPUT_DEVICE_TABLET_PAD)) ||
(!touchpad && (dev->type != WLR_INPUT_DEVICE_POINTER)))
{
return 1.0;
}
return touchpad ? touchpad_scroll_speed : mouse_scroll_speed;
}
It's called from wf::pointer_t::handle_pointer_axis() with touchpad = (ev->source == WL_POINTER_AXIS_SOURCE_FINGER). Finger scrolling from a touchpad arrives as a wlr_pointer_axis_event from a device of type WLR_INPUT_DEVICE_POINTER, never WLR_INPUT_DEVICE_TABLET_PAD, so the first condition is always true for touchpads and the function returns 1.0. touchpad_scroll_speed is only ever applied to tablet pads, which don't emit pointer axis events.
Repro: set touchpad_scroll_speed = 0.1 under [input] (or live over IPC) and two-finger scroll in any client: the speed doesn't change. mouse_scroll_speed works as expected for wheels.
Suggested fix: both kinds of scroll come from pointer devices, so check the device type once:
if (dev->type != WLR_INPUT_DEVICE_POINTER)
{
return 1.0;
}
return touchpad ? touchpad_scroll_speed : mouse_scroll_speed;
I confirmed the diagnosis by scaling finger-source axis events from pointer devices by touchpad_scroll_speed in an input_event_signal<wlr_pointer_axis_event> handler in a plugin; with that, the option behaves as documented.
- Dominant language
- C++
- Stars
- 3.1k
- Forks
- 238
- Avg merge
- 6d 6h
- Merged PRs (30d)
- 8
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from WayfireWM/wayfire
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
easy enhancement good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
WayfireWM/wayfire#3005 · 14 comments ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 45/100
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
WayfireWM/wayfire#3129 · 2 reactions ·
Maintainers usually reply within 1 day
All issues in WayfireWM/wayfire
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
cp-algorithms/cp-algorithms#1715 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Icinga/icinga2#11058 · 1 comment ·
Maintainers usually reply within 1 day
-
status:needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
PX4/PX4-Autopilot#28924 ·
Maintainers usually reply within 1 day
-
component: split-view platform: windows
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
zen-browser/desktop#15616 · 1 reaction ·
Maintainers usually reply within 1 day