[libinput] Sane unset behaviour of scroll method and acceleration profile properties
ClosedPublic

Authored by romangg on Dec 5 2016, 2:55 AM.

Details

Summary

Unsetting a scroll method should only work, if the scroll method is currently active. For example when scroll-two-finger is active (i.e. scroll-edge, scroll-on-button-down is not active):

  • unsetting scroll-two-finger should deactivate it and activate no-scroll
  • but unsetting for example scroll-edge should not deactivate scroll-two-finger and not activate no-scroll

Reworked setting scroll method auto test in order to test it.

Regarding acceleration profiles: Unsetting one, should always switch to the other possible one as long as both are supported. In this case LIBINPUT_CONFIG_ACCEL_PROFILE_NONE is not a valid option in contrast to the definition of the scroll method enums.

Test Plan

Manually and auto tests.

Diff Detail

Repository
R108 KWin
Lint
Lint Skipped
Unit
Unit Tests Skipped
romangg updated this revision to Diff 8758.Dec 5 2016, 2:55 AM
romangg retitled this revision from to [libinput] Sane unset behaviour of scroll method and acceleration profile properties.
romangg updated this object.
romangg edited the test plan for this revision. (Show Details)
romangg added a reviewer: KWin.
romangg set the repository for this revision to R108 KWin.
romangg added a project: KWin.
romangg added a subscriber: plasma-devel.
Restricted Application added a subscriber: kwin. · View Herald TranscriptDec 5 2016, 2:55 AM
graesslin accepted this revision.Dec 5 2016, 8:22 PM
graesslin added a reviewer: graesslin.
graesslin added a subscriber: graesslin.
graesslin added inline comments.
libinput/device.cpp
363–364

While I approve the fix of coding style, I suggest to turn it into a dedicated change (same in line 318) to not clutter the commit with unrelated changes.

This revision is now accepted and ready to land.Dec 5 2016, 8:22 PM
This revision was automatically updated to reflect the committed changes.