Merge lp://staging/~andreas-pokorny/mir/add-option-to-disable-acceleration into lp://staging/mir
- add-option-to-disable-acceleration
- Merge into development-branch
Status: | Merged |
---|---|
Approved by: | Daniel van Vugt |
Approved revision: | no longer in the source branch. |
Merged at revision: | 3256 |
Proposed branch: | lp://staging/~andreas-pokorny/mir/add-option-to-disable-acceleration |
Merge into: | lp://staging/mir |
Prerequisite: | lp://staging/~andreas-pokorny/mir/bump-platform-to-5 |
Diff against target: |
454 lines (+118/-45) 11 files modified
examples/server_example_input_device_config.cpp (+30/-11) examples/server_example_input_device_config.h (+2/-8) include/client/mir_toolkit/mir_input_device.h (+15/-0) include/platform/mir/input/pointer_settings.h (+4/-0) include/server/mir/input/pointer_configuration.h (+10/-4) src/platforms/evdev/libinput_device.cpp (+16/-9) src/server/input/default_device.cpp (+4/-2) tests/include/mir/test/doubles/mock_libinput.h (+2/-0) tests/mir_test_doubles/mock_libinput.cpp (+12/-0) tests/mir_test_framework/fake_input_device_impl.cpp (+7/-4) tests/unit-tests/input/evdev/test_libinput_device.cpp (+16/-7) |
To merge this branch: | bzr merge lp://staging/~andreas-pokorny/mir/add-option-to-disable-acceleration |
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
PS Jenkins bot (community) | continuous-integration | Approve | |
Daniel van Vugt | Approve | ||
Mir CI Bot | continuous-integration | Approve | |
Kevin DuBois (community) | Approve | ||
Review via email: mp+280593@code.staging.launchpad.net |
This proposal supersedes a proposal from 2015-12-14.
Commit message
add an option to select pointer acceleration profile
Allow the selection of one out of three porfiles: diabled, flat, adaptive. The last one is adaptive to the poimter movement, and our previous default behavior.
Description of the change
This MP adds a configuration option to select the cursor acceleration profile for pointing devices. Libinput offers three profiles including one that disables acceleration. Flat and disabled are now also simulated by the fake input devices.
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal | # |
Daniel van Vugt (vanvugt) wrote : Posted in a previous version of this proposal | # |
Thanks for putting the time into this. I suspect this is slightly the wrong approach though:
+ bool enable_
would be better replaced by an enum that matches enum libinput_
So we could set it as LIBINPUT_
Daniel van Vugt (vanvugt) wrote : Posted in a previous version of this proposal | # |
And therefore we would end up calling libinput_
http://
Andreas Pokorny (andreas-pokorny) wrote : Posted in a previous version of this proposal | # |
Agreed. I guess that would turn that into a more permanent solution.
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal | # |
FAILED: Continuous integration, rev:3193
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:3193
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:3193
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal | # |
FAILED: Continuous integration, rev:3193
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:3193
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
Andreas Pokorny (andreas-pokorny) wrote : | # |
^ needs a newer libinput.. will land with 0.18...
Daniel van Vugt (vanvugt) wrote : | # |
Looking good except:
(1) Dead code needs removing: bool enable_
(2) I wonder if we can use more concise and accurate naming than libinput does?...
MirPointerAcc
mir_pointer_
mir_pointer_
mir_pointer_
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:3195
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
FAILURE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Daniel van Vugt (vanvugt) wrote : | # |
"acceleration" is already a noun so we don't need to call it "acceleration_
Asking people to remember how to spell acceleration is bad enough without adding extra words :)
Andreas Pokorny (andreas-pokorny) wrote : | # |
@duflu: in both the enum and commandline option?
Andreas Pokorny (andreas-pokorny) wrote : | # |
I think in both cases we could leave the profile out..
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:3196
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Daniel van Vugt (vanvugt) wrote : | # |
Oh, we need to check and verify that the libinput API is not misusing the word "acceleration" like others do. If they are using the word acceleration accurately, then curiously there is no option to change the pointer speed without also accelerating.
We need to check the libinput source and make sure their terminology is correct before we do the same.
Daniel van Vugt (vanvugt) wrote : | # |
Looking at the libinput code and docs, it gives conflicting answers as to what "flat acceleration" means. In the code it kind of looks like "flat acceleration" means "zero acceleration with constant velocity multiplier".
Please check my findings but I think this means LIBINPUT_
MirPointerAcc
mir_pointer_
mir_pointer_
mir_pointer_
Sorry to be pedantic, but it's libinput that has apparently confused the physics terminology. We should try not to copy their mistakes, if they are mistakes...
Andreas Pokorny (andreas-pokorny) wrote : | # |
profile flat means that the way the relative movement is interpreted is 'constant' - independent of the current velocity of mouse - or better independent of the most recent measured pointer deltas.
So hmm I think speed_native is ok-ish but mir_pointer_
Daniel van Vugt (vanvugt) wrote : | # |
Looking at the libinput source, I *think* LIBINPUT_
I'd be inclined to fix up the terminology for Mir rather than copy the common misnomer. But I'd also like more people to review the libinput source and check my assertion is correct.
Andreas Pokorny (andreas-pokorny) wrote : | # |
Ok I see your point. Still speed_constant seems not right. From the users perspective the setting will change the velocity of the movement. So the user will observe an acceleration.
Daniel van Vugt (vanvugt) wrote : | # |
Yes, the user will always observe instantaneous acceleration when velocity changes from zero to non-zero. However pointer acceleration is not about that first event, it's about the second and subsequent events. In the second and subsequent motion events your acceleration is precisely zero if your velocity is constant/flat. So a constant velocity or flat mode should not have "acceleration" in its name.
That all said, a constant velocity multiplier of anything other that one is arguably useless. Less than one and a lot of code will never move the cursor. More than one and you lose pixel accuracy on screen. I guess that's why the libinput code limits the multiplier for flat mode to 2.
Daniel van Vugt (vanvugt) wrote : | # |
(1) Naming needs clarification per above.
Manual testing results:
(2) Surprisingly --mouse-
(3) The --mouse-
Andreas Pokorny (andreas-pokorny) wrote : | # |
> (1) Naming needs clarification per above.
>
> Manual testing results:
>
> (2) Surprisingly --mouse-
> --mouse-
> Should it be removed in favour of constant mode with no bias?
ok will investigate that..
>
> (3) The --mouse-
> (mir_proving_
> it needs to be promoted up into libmirserver default config at some point.
Yeah we should do that. Hmm it would be nicer if we could make the configuration device specific.. The current unique ids are not good enough for that.. thats another story that needs fixing..
Kevin DuBois (kdub) wrote : | # |
+ settings.handedness = left_handed? mir_pointer_
nit: spacing
lgtm, pending fixing the issues Daniel brought up
Mir CI Bot (mir-ci-bot) wrote : | # |
PASSED: Continuous integration, rev:3196
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
Kevin DuBois (kdub) wrote : | # |
> lgtm, pending fixing the issues Daniel brought up
suppose I'll "pre-approve"
Andreas Pokorny (andreas-pokorny) wrote : | # |
Yes this is a bug in libinput. It does not handle the NONE case yet so it falls through to either adaptive high-dpi or low-dpi acceleration.
Andreas Pokorny (andreas-pokorny) wrote : | # |
So it seems none was only intended to indicate that there is no acceleraton filter available. We could remap our enum value to flat and 'speed' zero, or document how to acchieve an unaccelerated setting. I would prefer the second option since it would avoid mapping errors when the current status is read back, and we have to interpret a float value.
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:3197
http://
Executed test runs:
SUCCESS: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
SUCCESS: http://
deb: http://
FAILURE: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Daniel van Vugt (vanvugt) wrote : | # |
(1) constant mode means zero acceleration, so the enum should not have "acceleration" in its name. I'm just trying to be physically accurate. I think we need to either remove the word "acceleration" from the enum or rename "mir_pointer_
(2) Nit: Please try to keep code within 80 columns.
(3) Nit: Unwanted blank line and s/separates/
154 + * function based on the current velocity that usually consists of a two linear
155 + *
156 + * inclines separates by a plateau.
Mir CI Bot (mir-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:3202
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:3198
http://
Executed test runs:
SUCCESS: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
SUCCESS: http://
deb: http://
FAILURE: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:3202
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Mir CI Bot (mir-ci-bot) wrote : | # |
PASSED: Continuous integration, rev:3203
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:3203
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Daniel van Vugt (vanvugt) wrote : | # |
Works nicely now: mir_demo_server --vt 1 --mouse-
PS Jenkins bot (ps-jenkins) : | # |
PASSED: Continuous integration, rev:3192 jenkins. qa.ubuntu. com/job/ mir-ci/ 5847/ jenkins. qa.ubuntu. com/job/ mir-android- vivid-i386- build/5309 jenkins. qa.ubuntu. com/job/ mir-clang- vivid-amd64- build/4215 jenkins. qa.ubuntu. com/job/ mir-mediumtests -vivid- touch/5258 jenkins. qa.ubuntu. com/job/ mir-mediumtests -xenial- touch/157/ console jenkins. qa.ubuntu. com/job/ mir-xenial- amd64-ci/ 175 jenkins. qa.ubuntu. com/job/ mir-xenial- amd64-ci/ 175/artifact/ work/output/ *zip*/output. zip jenkins. qa.ubuntu. com/job/ mir-xenial- i386-ci/ 175 jenkins. qa.ubuntu. com/job/ mir-xenial- i386-ci/ 175/artifact/ work/output/ *zip*/output. zip jenkins. qa.ubuntu. com/job/ mir-mediumtests -builder- vivid-armhf/ 5258 jenkins. qa.ubuntu. com/job/ mir-mediumtests -builder- vivid-armhf/ 5258/artifact/ work/output/ *zip*/output. zip jenkins. qa.ubuntu. com/job/ mir-mediumtests -runner- touch/7778 s-jenkins. ubuntu- ci:8080/ job/touch- flash-device/ 26049 jenkins. qa.ubuntu. com/job/ mir-mediumtests -builder- xenial- armhf/155 jenkins. qa.ubuntu. com/job/ mir-mediumtests -builder- xenial- armhf/155/ artifact/ work/output/ *zip*/output. zip jenkins. qa.ubuntu. com/job/ mir-mediumtests -runner- xenial- touch/14/ console s-jenkins. ubuntu- ci:8080/ job/touch- flash-device/ 26052
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
FAILURE: http://
SUCCESS: http://
Click here to trigger a rebuild: s-jenkins. ubuntu- ci:8080/ job/mir- ci/5847/ rebuild
http://