kcms/input: Allow WheelScrollLines = 0; some code cleanup
AbandonedPublic

Authored by valeriymalov on Aug 26 2017, 2:46 PM.

Details

Reviewers
None
Group Reviewers
Plasma
VDG
Summary

This should allow user to disable scrollwheel in KDE/Qt apps
This does not seem to affect non-Qt apps, e.g. Google Chrome, but they
ignore WheelScrollLines setting anyway and require some other solution

BUG: 192427

Some code cleanup:
Reorder headers
Replace RIGHT/LEFT_HANDED defines with enum
Replace deprecated KStandardDirs
Remove unescessary explicit casts
Remvoe old warning
Replace NULL with nullptr
Fix header guards

Test Plan

builds, can disable scroll in kde apps, switch left/right hand still works

Diff Detail

Repository
R119 Plasma Desktop
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
valeriymalov created this revision.Aug 26 2017, 2:46 PM
Restricted Application added a project: Plasma. · View Herald TranscriptAug 26 2017, 2:46 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
mart added a subscriber: mart.Sep 1 2017, 9:38 AM

i don't think the setting makes sense

mart added a reviewer: VDG.Sep 1 2017, 9:38 AM

I agree with Marco, this doesn't make sense and would not work with mouse wheels controlled through xinput and also not on Wayland. Also that it does only affect Qt applications is a clear sign that this should not be done. That would be highly confusing.

It does work with both evdev-controlled pointers, libinput-controlled pointers and even on Wayland. As far as I understand, it just controls how Qt apps react to single "full" scroll event. It's doesn't affect system scroll speed, although takes it in account.

X11 doesn't seem to expose a good mechanism for controlling system-wide scroll speed anyway, judging by xinput:

  • evdev exposes "Scroll Distance", which can only slow down the scrolling whole number of times and makes GTK+ apps behave weird
  • libinput doesn't seem to expose any options related to scroll speed at all?

So this can't be done, this shouldn't be done or this should be done other way? Should this just be a separate checkbox "disable scrolling in Qt applications" or it's a completely useless feature?

Also, anything on the other commit (refactor changes)? MouseConfig::apply() eventually needs to be split into multiple parts since right now it's a lot of evdev code and not all of it works on libinput devices. If the commit doesn't belong in this diff, I can put it with eventual X11 libinput support then.

valeriymalov abandoned this revision.Oct 24 2017, 11:07 AM

kcm_input seems to be getting proper refactor in D8168