Commit graph

14 commits

Author SHA1 Message Date
Martin Gräßlin
a9ac2739f7 [autotests/libinput] Set a valid sysName by default
The autotests are failing on build.kde.org due to the generated DBus
object path not being valid. This might be due to sysName having been
empty by default.
2016-08-15 16:55:10 +02:00
Martin Gräßlin
cd6d82fcbc [libinput] Add device configuration for tap-drag-lock
From libinput documentation:
Also optional is a feature called "drag lock". With drag lock disabled,
lifting the finger will stop any drag process. When enabled, libinput
will ignore a finger up event during a drag process, provided the finger
is set down again within a implementation-specific timeout.
2016-08-11 16:32:00 +02:00
Martin Gräßlin
02cf9e8a64 [libinput] Add support for tap and drag
From libinput documentation:
A tap immediately followed by a finger down and that finger being held
down emulates a button press. Moving the finger around can thus drag
the selected item on the screen.
2016-08-11 16:02:26 +02:00
Martin Gräßlin
2f7298bed5 [libinput] Add support for tapToClick configuration
New property added to Device which allows reading and setting the
tap to click configuration.
2016-08-11 15:13:36 +02:00
Martin Gräßlin
8a83a6fef5 [libinput] Add support for gesture events
Summary:
Gesture events are swipe or pinch events on a touch pad.

This change implements basic support by:
 * wrapping them in LibInput::Event
 * processing them in LibInput::Connection and emitting
   dedicated signals
 * Forwarding them in InputRedirection to PointerInputRedirection
 * Support them in the internal input event filter
 * Printing debug information in DebugConsole

Further handling is not yet done. In future the following should be
implemented:
 * activating e.g. zoom and present windows on pinch/swipe gesture
 * forwarding non global gestures to KWayland

Note that forwarding to KWayland is not yet useful as QtWayland does
not yet have support for the unstable protocol. No Qt application could
make use of it yet. So for the moment just global gestures is the best
we can get.

Test Plan: Looked at output of DebugConsole when triggering gestures

Reviewers: #kwin, #plasma_on_wayland

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

Differential Revision: https://phabricator.kde.org/D2359
2016-08-08 09:15:06 +02:00
Martin Gräßlin
6a6af0e8b5 [libinput] Add optional device detection for cap tablet tool
The capability tablet tool is new in Libinput 1.2. As build.kde.org
does not yet support this version, it's only an optional check.

So far the code only detects whether the capability exists and reports
this accordingly.
2016-08-03 09:31:47 +02:00
Martin Gräßlin
2d9ff54e68 [autotest/libinput] Add a basic test for Context
This test mocks part of KWin::Udev, udev and libinput. The test itself
is still rather limited and only verifies whether libinput is valid or
not and that assignSeat works. Most of the interaction is not yet tested,
though to a large degree doesn't make sense and should be rather tested
in the context of LibInput::Connection.
2016-06-02 15:55:34 +02:00
Martin Gräßlin
1e564989c9 [autotest/libinput] Add a mocked test for Libinput::TouchEvent 2016-05-31 10:14:28 +02:00
Martin Gräßlin
8851bb8daa [autotest/libinput] Add a mocked test for Libinput::PointerEvent 2016-05-31 09:23:48 +02:00
Martin Gräßlin
ac227e57c7 [autotest/libinput] Add a mocked test for Libinput::KeyEvent
This new test includes everything used in events.cpp to the mocked
functionality of libinput. Only key event is implemented so far, the
referenced pointer and touch functions are mocked with default values.

The test verifies that a KeyEvent gets created and the key press/release
works as expected.
2016-05-30 17:46:53 +02:00
Martin Gräßlin
2e4db5c2b8 [autotests/libinput] Add test case for Device::setEnabled and isEnabled 2016-05-30 16:04:06 +02:00
Martin Gräßlin
27523b6ecb [autotests/libinput] Add test case for Device::isAlphaNumericKeyboard 2016-05-30 08:22:04 +02:00
Martin Gräßlin
3aa8dc376e [autotest/libinput] Add test case for the supported pointer buttons 2016-05-25 17:25:58 +02:00
Martin Gräßlin
eb44bbe460 [autotest] Add a test case for KWin::LibInput::Device
Summary:
The usage of libinput is completely mocked. The test covers all the
constant properties read by Device.

There are some features which are not yet tested:
* alphaNumericKeyboard
* supportedButtons
* enabled

The setters for leftHanded and pointerAcceleration are also covered
including the variants where it can fail.

Reviewers: #plasma

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D1648
2016-05-20 15:51:20 +02:00