mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-03-25 14:10:34 +01:00
Compare commits
22 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1b560b01fe | ||
|
|
35c661aa3a | ||
|
|
39ac181ffc | ||
|
|
8ea7880344 | ||
|
|
46c1bd1430 | ||
|
|
d90af8ab14 | ||
|
|
173599e7b9 | ||
|
|
edddb5c0a1 | ||
|
|
d625520be1 | ||
|
|
602820f820 | ||
|
|
dc1edd140f | ||
|
|
66b2d85a5e | ||
|
|
e84dfbb731 | ||
|
|
1e547e2baa | ||
|
|
4cfe13df44 | ||
|
|
2b632541db | ||
|
|
c6ab679fef | ||
|
|
dcf05cd757 | ||
|
|
c856f26dd7 | ||
|
|
2e5e74c0bc | ||
|
|
768880d7b9 | ||
|
|
029959c93f |
25 changed files with 245 additions and 67 deletions
|
|
@ -202,17 +202,6 @@ fedora:32@qemu-prep:
|
|||
FDO_DISTRIBUTION_PACKAGES: $FEDORA_QEMU_RPMS
|
||||
allow_failure: true
|
||||
|
||||
fedora:30@container-prep:
|
||||
extends:
|
||||
- .fdo.container-build@fedora
|
||||
- .policy
|
||||
stage: prep
|
||||
variables:
|
||||
GIT_STRATEGY: none
|
||||
FDO_DISTRIBUTION_VERSION: '30'
|
||||
FDO_DISTRIBUTION_PACKAGES: $FEDORA_PACKAGES
|
||||
FDO_DISTRIBUTION_TAG: $FEDORA_TAG
|
||||
|
||||
fedora:31@container-prep:
|
||||
extends:
|
||||
- .fdo.container-build@fedora
|
||||
|
|
@ -355,16 +344,6 @@ freebsd:11.2@container-prep:
|
|||
only:
|
||||
- schedules
|
||||
|
||||
fedora:30@container-clean:
|
||||
extends:
|
||||
- .container-clean
|
||||
variables:
|
||||
GIT_STRATEGY: none
|
||||
FEDORA_VERSION: '30'
|
||||
CURRENT_CONTAINER_IMAGE: $CI_REGISTRY_IMAGE/fedora/$FDO_DISTRIBUTION_VERSION:$FDO_DISTRIBUTION_TAG
|
||||
FDO_DISTRIBUTION_VERSION: '30'
|
||||
FDO_DISTRIBUTION_TAG: $FEDORA_TAG
|
||||
|
||||
fedora:31@container-clean:
|
||||
extends:
|
||||
- .container-clean
|
||||
|
|
@ -664,7 +643,8 @@ scan-build@fedora:32:
|
|||
MESON_TEST_ARGS: ''
|
||||
before_script:
|
||||
- dnf install -y clang-analyzer findutils
|
||||
after_script:
|
||||
script:
|
||||
- .gitlab-ci/meson-build.sh
|
||||
- test ! -d "$MESON_BUILDDIR"/meson-logs/scanbuild && exit 0
|
||||
- test $(find "$MESON_BUILDDIR"/meson-logs/scanbuild -maxdepth 0 ! -empty -exec echo "not empty" \; | wc -l) -eq 0 && exit 0
|
||||
- echo "Check scan-build results"
|
||||
|
|
@ -807,18 +787,6 @@ coverity:
|
|||
# #
|
||||
#################################################################
|
||||
|
||||
fedora:30@default-build:
|
||||
stage: distro
|
||||
extends:
|
||||
- .build@template
|
||||
- .fdo.distribution-image@fedora
|
||||
variables:
|
||||
FDO_DISTRIBUTION_VERSION: '30'
|
||||
FDO_DISTRIBUTION_TAG: $FEDORA_TAG
|
||||
needs:
|
||||
- "fedora:30@container-prep"
|
||||
|
||||
|
||||
fedora:31@default-build:
|
||||
stage: distro
|
||||
extends:
|
||||
|
|
|
|||
|
|
@ -485,7 +485,8 @@ scan-build@{{distro.name}}:{{version}}:
|
|||
MESON_TEST_ARGS: ''
|
||||
before_script:
|
||||
- dnf install -y clang-analyzer findutils
|
||||
after_script:
|
||||
script:
|
||||
- .gitlab-ci/meson-build.sh
|
||||
- test ! -d "$MESON_BUILDDIR"/meson-logs/scanbuild && exit 0
|
||||
- test $(find "$MESON_BUILDDIR"/meson-logs/scanbuild -maxdepth 0 ! -empty -exec echo "not empty" \; | wc -l) -eq 0 && exit 0
|
||||
- echo "Check scan-build results"
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@ distributions:
|
|||
- name: fedora
|
||||
tag: *default_tag
|
||||
versions:
|
||||
- '30'
|
||||
- '31'
|
||||
- '32'
|
||||
want_qemu: true
|
||||
|
|
|
|||
|
|
@ -287,28 +287,28 @@ details on the hwdb and how to modify it locally.
|
|||
.. _faq_timer_offset:
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
What causes the "timer offset negative" warning?
|
||||
What causes the "your system is too slow" warning?
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
libinput relies on the caller to call **libinput_dispatch()** whenever data is
|
||||
available on the epoll-fd. Doing so will process the state of all devices
|
||||
and can trigger some timers to be set (e.g. palm detection, tap-to-click,
|
||||
disable-while-typing, etc.). Internally, libinput's time offsets are always
|
||||
based on the event time of the triggering event.
|
||||
available. **libinput_dispatch()** will process the state of all devices,
|
||||
including some time-sensitive features (e.g. palm detection, tap-to-click,
|
||||
disable-while-typing, etc.).
|
||||
|
||||
For example, a touch event with time T may trigger a timer for the time T +
|
||||
180ms. When setting a timer, libinput checks the wall clock time to ensure
|
||||
that this time T + offset is still in the future. If not, the warning is
|
||||
logged.
|
||||
If the time between the event and the call to **libinput_dispatch()**
|
||||
is excessive, those features may not work correctly. For example, a delay in
|
||||
touch event processing may cause wrong or missing tap-to-click events or
|
||||
a palm may not be detected correctly.
|
||||
|
||||
When this warning appears, it simply means that too much time has passed
|
||||
between the event occurring (and the epoll-fd triggering) and the current
|
||||
time. In almost all cases this is an indication of the caller being
|
||||
overloaded and not handling events as speedily as required.
|
||||
between the event occurring and the current time. In almost all cases this
|
||||
is an indication of the caller being overloaded and not handling events as
|
||||
speedily as required.
|
||||
|
||||
The warning has no immediate effect on libinput's behavior but some of the
|
||||
functionality that relies on the timer may be impeded (e.g. palms are not
|
||||
detected as they should be).
|
||||
functionality that relies on the timer may be impeded. This is not a bug in
|
||||
libinput. libinput does not control how quickly **libinput_dispatch()** is
|
||||
called.
|
||||
|
||||
.. _faq_wayland:
|
||||
|
||||
|
|
|
|||
|
|
@ -64,3 +64,17 @@ See :ref:`reporting_bugs` for more details.
|
|||
Note that it most cases, libinput cannot actually fix the issue. Filing a
|
||||
bug is useful to figure out if there are other factors at play or whether
|
||||
there are heuristics we can employ to reduce the impact.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
AlpsPS/2 ALPS DualPoint TouchPad jumping to 4095/0
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
A special case of pointer jumps happens on ``AlpsPS/2 ALPS DualPoint TouchPad``
|
||||
devices found in the Lenovo ThinkPad E465 and E550 and likely others with
|
||||
the same touchpad hardware. On those devices, the touchpad occasionally
|
||||
sends an event for the second finger to move to position 4095/0 before
|
||||
moving back to the original position. libinput detects this movement and
|
||||
removes it but depending on the interaction this may cause a smaller jump
|
||||
later when the coordinates reset to the new position of the finger.
|
||||
|
||||
Some more information is available in `Gitlab Issue #492 <https://gitlab.freedesktop.org/libinput/libinput/-/issues/492>`__.
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
project('libinput', 'c',
|
||||
version : '1.16.1',
|
||||
version : '1.16.5',
|
||||
license : 'MIT/Expat',
|
||||
default_options : [ 'c_std=gnu99', 'warning_level=2' ],
|
||||
meson_version : '>= 0.45.0')
|
||||
|
|
@ -803,6 +803,7 @@ if get_option('tests')
|
|||
'test/litest-device-synaptics-x220.c',
|
||||
'test/litest-device-synaptics-hover.c',
|
||||
'test/litest-device-synaptics-i2c.c',
|
||||
'test/litest-device-synaptics-pressurepad.c',
|
||||
'test/litest-device-synaptics-rmi4.c',
|
||||
'test/litest-device-synaptics-st.c',
|
||||
'test/litest-device-synaptics-t440.c',
|
||||
|
|
|
|||
|
|
@ -19,6 +19,12 @@ MatchVendor=0x0002
|
|||
MatchProduct=0x0008
|
||||
ModelALPSSerialTouchpad=1
|
||||
|
||||
[ALPS i2c Touchpads]
|
||||
MatchUdevType=touchpad
|
||||
MatchBus=i2c
|
||||
MatchVendor=0x0488
|
||||
AttrPalmPressureThreshold=180
|
||||
|
||||
[ALPS v8 Touchpads]
|
||||
MatchUdevType=touchpad
|
||||
MatchBus=ps2
|
||||
|
|
|
|||
|
|
@ -5,9 +5,14 @@ MatchName=*Lid Switch*
|
|||
MatchDMIModalias=dmi:*svnMicrosoftCorporation:pnSurface3:*
|
||||
AttrLidSwitchReliability=write_open
|
||||
|
||||
[Microsoft Surface 3 Type Cover Keyboard]
|
||||
MatchName=*Microsoft Surface Type Cover Keyboard*
|
||||
MatchDMIModalias=dmi:*svnMicrosoftCorporation:pnSurface3:*
|
||||
# Matches both Surface Laptop keyboards as well as type covers.
|
||||
# i.e.
|
||||
# - Surface 3: Microsoft Surface 3 Type Cover Keyboard
|
||||
# - Surface Laptop 3: Microsoft Surface 045E:09AE Keyboard
|
||||
# - Surface Book 2: Microsoft Surface Keyboard
|
||||
[Microsoft Surface Keyboard]
|
||||
MatchName=*Microsoft Surface *Keyboard*
|
||||
MatchDMIModalias=dmi:*svnMicrosoftCorporation:*
|
||||
AttrKeyboardIntegration=internal
|
||||
|
||||
[Microsoft Nano Transceiver v2.0]
|
||||
|
|
|
|||
|
|
@ -57,7 +57,8 @@ MatchProduct=0x0265
|
|||
AttrSizeHint=162x115
|
||||
AttrTouchSizeRange=20:10
|
||||
AttrPalmSizeThreshold=900
|
||||
AttrThumbSizeThreshold=700
|
||||
AttrThumbSizeThreshold=800
|
||||
AttrPalmPressureThreshold=190
|
||||
|
||||
[Apple Magic Trackpad v2 (new vendor ID)]
|
||||
MatchVendor=0x004C
|
||||
|
|
@ -65,7 +66,8 @@ MatchProduct=0x0265
|
|||
AttrSizeHint=162x115
|
||||
AttrTouchSizeRange=20:10
|
||||
AttrPalmSizeThreshold=900
|
||||
AttrThumbSizeThreshold=700
|
||||
AttrThumbSizeThreshold=800
|
||||
AttrPalmPressureThreshold=190
|
||||
|
||||
[Apple Touchpad OneButton]
|
||||
MatchUdevType=touchpad
|
||||
|
|
|
|||
|
|
@ -11,6 +11,18 @@ MatchUdevType=touchpad
|
|||
MatchDMIModalias=dmi:*svnDellInc.:*
|
||||
AttrMscTimestamp=watch
|
||||
|
||||
[Dell Inspiron 15R N5110 Touchpad]
|
||||
MatchUdevType=touchpad
|
||||
MatchName=*AlpsPS/2 ALPS GlidePoint
|
||||
MatchDMIModalias=dmi:*svnDellInc.:*pnInspironN5110*
|
||||
AttrPressureRange=100:95
|
||||
|
||||
[Dell Latitude E5510 Touchpad]
|
||||
MatchUdevType=touchpad
|
||||
MatchName=*AlpsPS/2 ALPS GlidePoint
|
||||
MatchDMIModalias=dmi:*svnDellInc.:pnLatitudeE5510:*
|
||||
AttrPressureRange=100:90
|
||||
|
||||
[Dell Lattitude E6220 Touchpad]
|
||||
MatchName=*AlpsPS/2 ALPS GlidePoint
|
||||
MatchDMIModalias=dmi:*svnDellInc.:pnLatitudeE6220:*
|
||||
|
|
@ -28,6 +40,11 @@ MatchDMIModalias=dmi:*svnDellInc.:*pnXPS139333*
|
|||
AttrPressureRange=15:10
|
||||
AttrPalmPressureThreshold=150
|
||||
|
||||
[Dell XPS 15 9500 Touchpad]
|
||||
MatchName=* Touchpad
|
||||
MatchDMIModalias=dmi:*svnDellInc.:pnXPS159500:*
|
||||
ModelTouchpadVisibleMarker=0
|
||||
|
||||
[Dell Latitude D620 Trackpoint]
|
||||
MatchName=*DualPoint Stick
|
||||
MatchDMIModalias=dmi:*svnDellInc.:pnLatitudeD620*
|
||||
|
|
|
|||
|
|
@ -86,3 +86,11 @@ MatchUdevType=touchpad
|
|||
MatchName=Atmel maXTouch Touchpad
|
||||
MatchDMIModalias=dmi:*svn*GOOGLE*:pn*Samus*
|
||||
ModelChromebook=1
|
||||
|
||||
[Google Chromebook Eve]
|
||||
MatchUdevType=touchpad
|
||||
MatchName=ACPI0C50:00 18D1:5028
|
||||
MatchDMIModalias=dmi:*svnGoogle:pnEve*
|
||||
ModelChromebook=1
|
||||
AttrPressureRange=6:4
|
||||
AttrThumbPressureThreshold=45
|
||||
|
|
|
|||
|
|
@ -130,6 +130,14 @@ MatchName=*TPPS/2 IBM TrackPoint
|
|||
MatchDMIModalias=dmi:*svnLENOVO:*:pvrThinkPadX1Yoga1st:*
|
||||
AttrTrackpointMultiplier=1.25
|
||||
|
||||
# A true pressurepad so let's not use pressure for contact size
|
||||
# https://gitlab.freedesktop.org/libinput/libinput/-/issues/562
|
||||
[Lenovo Yoga 9i Pressurepad]
|
||||
MatchBus=i2c
|
||||
MatchVendor=0x06CB
|
||||
MatchProduct=0xCE37
|
||||
AttrEventCodeDisable=ABS_MT_PRESSURE;ABS_PRESSURE;
|
||||
|
||||
# Lenovo Carbon X1 6th gen (RMI4 only, PS/2 is broken on this device,
|
||||
# sends bogus ABS_MT_TOOL_TYPE events for MT_TOOL_PALM
|
||||
[Lenovo Carbon X1 6th gen]
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@
|
|||
static inline char *
|
||||
builddir_lookup(void)
|
||||
{
|
||||
char execdir[PATH_MAX] = {0};
|
||||
char execdir[PATH_MAX];
|
||||
char *pathsep;
|
||||
ssize_t nread;
|
||||
|
||||
|
|
@ -50,7 +50,7 @@ builddir_lookup(void)
|
|||
|
||||
/* readlink doesn't terminate the string and readlink says
|
||||
anything past sz is undefined */
|
||||
execdir[++nread] = '\0';
|
||||
execdir[nread] = '\0';
|
||||
|
||||
pathsep = strrchr(execdir, '/');
|
||||
if (!pathsep)
|
||||
|
|
|
|||
|
|
@ -194,7 +194,7 @@ get_key_type(uint16_t code)
|
|||
return KEY_TYPE_KEY;
|
||||
if (code >= BTN_DPAD_UP && code <= BTN_DPAD_RIGHT)
|
||||
return KEY_TYPE_BUTTON;
|
||||
if (code >= KEY_ALS_TOGGLE && code <= KEY_ONSCREEN_KEYBOARD)
|
||||
if (code >= KEY_ALS_TOGGLE && code < BTN_TRIGGER_HAPPY)
|
||||
return KEY_TYPE_KEY;
|
||||
if (code >= BTN_TRIGGER_HAPPY && code <= BTN_TRIGGER_HAPPY40)
|
||||
return KEY_TYPE_BUTTON;
|
||||
|
|
|
|||
|
|
@ -358,8 +358,9 @@ tp_thumb_update_multifinger(struct tp_dispatch *tp)
|
|||
* the behavior of the other touches.)
|
||||
*/
|
||||
|
||||
if ((newest->initial_time - oldest->initial_time) < THUMB_TIMEOUT &&
|
||||
first->point.y < tp->thumb.lower_thumb_line) {
|
||||
if (newest &&
|
||||
(newest->initial_time - oldest->initial_time) < THUMB_TIMEOUT &&
|
||||
first->point.y < tp->thumb.lower_thumb_line) {
|
||||
tp_thumb_lift(tp);
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1542,6 +1542,19 @@ tp_detect_jumps(const struct tp_dispatch *tp,
|
|||
abs_distance = hypot(mm.x, mm.y) * reference_interval/tdelta;
|
||||
rel_distance = abs_distance - t->jumps.last_delta_mm;
|
||||
|
||||
/* Special case for the ALPS devices in the Lenovo ThinkPad E465,
|
||||
* E550. These devices send occasional 4095/0 events on two fingers
|
||||
* before snapping back to the correct position.
|
||||
* https://gitlab.freedesktop.org/libinput/libinput/-/issues/492
|
||||
* The specific values are hardcoded here, if this ever happens on
|
||||
* any other device we can make it absmax/absmin instead.
|
||||
*/
|
||||
if (tp->device->model_flags & EVDEV_MODEL_ALPS_SERIAL_TOUCHPAD &&
|
||||
t->point.x == 4095 && t->point.y == 0) {
|
||||
t->point = last->point;
|
||||
return true;
|
||||
}
|
||||
|
||||
/* Cursor jump if:
|
||||
* - current single-event delta is >20mm, or
|
||||
* - we increased the delta by over 7mm within a 12ms frame.
|
||||
|
|
|
|||
|
|
@ -2225,8 +2225,8 @@ evdev_device_create(struct libinput_seat *seat,
|
|||
|
||||
/* at most 5 SYN_DROPPED log-messages per 30s */
|
||||
ratelimit_init(&device->syn_drop_limit, s2us(30), 5);
|
||||
/* at most 5 "delayed processing" log messages per minute */
|
||||
ratelimit_init(&device->delay_warning_limit, s2us(60), 5);
|
||||
/* at most 5 "delayed processing" log messages per hour */
|
||||
ratelimit_init(&device->delay_warning_limit, s2us(60 * 60), 5);
|
||||
/* at most 5 log-messages per 5s */
|
||||
ratelimit_init(&device->nonpointer_rel_limit, s2us(5), 5);
|
||||
|
||||
|
|
|
|||
120
test/litest-device-synaptics-pressurepad.c
Normal file
120
test/litest-device-synaptics-pressurepad.c
Normal file
|
|
@ -0,0 +1,120 @@
|
|||
/*
|
||||
* Copyright © 2021 Red Hat, Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice (including the next
|
||||
* paragraph) shall be included in all copies or substantial portions of the
|
||||
* Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include "litest.h"
|
||||
#include "litest-int.h"
|
||||
|
||||
/* Device from https://gitlab.freedesktop.org/libinput/libinput/-/issues/562 */
|
||||
|
||||
static struct input_event down[] = {
|
||||
{ .type = EV_ABS, .code = ABS_X, .value = LITEST_AUTO_ASSIGN },
|
||||
{ .type = EV_ABS, .code = ABS_Y, .value = LITEST_AUTO_ASSIGN },
|
||||
{ .type = EV_ABS, .code = ABS_PRESSURE, .value = LITEST_AUTO_ASSIGN },
|
||||
{ .type = EV_ABS, .code = ABS_MT_SLOT, .value = LITEST_AUTO_ASSIGN },
|
||||
{ .type = EV_ABS, .code = ABS_MT_TRACKING_ID, .value = LITEST_AUTO_ASSIGN },
|
||||
{ .type = EV_ABS, .code = ABS_MT_POSITION_X, .value = LITEST_AUTO_ASSIGN },
|
||||
{ .type = EV_ABS, .code = ABS_MT_POSITION_Y, .value = LITEST_AUTO_ASSIGN },
|
||||
{ .type = EV_SYN, .code = SYN_REPORT, .value = 0 },
|
||||
{ .type = -1, .code = -1 },
|
||||
};
|
||||
|
||||
static struct input_event move[] = {
|
||||
{ .type = EV_ABS, .code = ABS_MT_SLOT, .value = LITEST_AUTO_ASSIGN },
|
||||
{ .type = EV_ABS, .code = ABS_X, .value = LITEST_AUTO_ASSIGN },
|
||||
{ .type = EV_ABS, .code = ABS_Y, .value = LITEST_AUTO_ASSIGN },
|
||||
{ .type = EV_ABS, .code = ABS_PRESSURE, .value = LITEST_AUTO_ASSIGN },
|
||||
{ .type = EV_ABS, .code = ABS_MT_POSITION_X, .value = LITEST_AUTO_ASSIGN },
|
||||
{ .type = EV_ABS, .code = ABS_MT_POSITION_Y, .value = LITEST_AUTO_ASSIGN },
|
||||
{ .type = EV_SYN, .code = SYN_REPORT, .value = 0 },
|
||||
{ .type = -1, .code = -1 },
|
||||
};
|
||||
|
||||
|
||||
static int
|
||||
get_axis_default(struct litest_device *d, unsigned int evcode, int32_t *value)
|
||||
{
|
||||
switch (evcode) {
|
||||
/* Always set pressure to zero. The real device sends pressure
|
||||
* values > 30 when the device is clicked but until this is a)
|
||||
* handled by libinput and b) integrated into this test suite
|
||||
* a zero value does the job.
|
||||
*/
|
||||
case ABS_PRESSURE:
|
||||
case ABS_MT_PRESSURE:
|
||||
*value = 0;
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
static struct litest_device_interface interface = {
|
||||
.touch_down_events = down,
|
||||
.touch_move_events = move,
|
||||
|
||||
.get_axis_default = get_axis_default,
|
||||
};
|
||||
|
||||
static struct input_id input_id = {
|
||||
.bustype = 0x18,
|
||||
.vendor = 0x6cb,
|
||||
.product = 0xce37,
|
||||
};
|
||||
|
||||
static int events[] = {
|
||||
EV_KEY, BTN_LEFT,
|
||||
EV_KEY, BTN_TOOL_FINGER,
|
||||
EV_KEY, BTN_TOUCH,
|
||||
EV_KEY, BTN_TOOL_DOUBLETAP,
|
||||
EV_KEY, BTN_TOOL_TRIPLETAP,
|
||||
EV_KEY, BTN_TOOL_QUADTAP,
|
||||
EV_KEY, BTN_TOOL_QUINTTAP,
|
||||
INPUT_PROP_MAX, INPUT_PROP_POINTER,
|
||||
INPUT_PROP_MAX, INPUT_PROP_BUTTONPAD,
|
||||
-1, -1,
|
||||
};
|
||||
|
||||
static struct input_absinfo absinfo[] = {
|
||||
{ ABS_X, 0, 1224, 0, 0, 12 },
|
||||
{ ABS_Y, 0, 756, 0, 0, 12 },
|
||||
{ ABS_PRESSURE, 0, 255, 0, 0, 0 },
|
||||
{ ABS_MT_SLOT, 0, 4, 0, 0, 0 },
|
||||
{ ABS_MT_POSITION_X, 0, 1224, 0, 0, 12 },
|
||||
{ ABS_MT_POSITION_Y, 0, 756, 0, 0, 12 },
|
||||
{ ABS_MT_TRACKING_ID, 0, 65535, 0, 0, 0 },
|
||||
{ ABS_MT_PRESSURE, 0, 255, 0, 0, 0 },
|
||||
{ ABS_MT_TOOL_TYPE, 0, 2, 0, 0, 0 },
|
||||
{ .value = -1 }
|
||||
};
|
||||
|
||||
TEST_DEVICE("synaptics-pressurepad",
|
||||
.type = LITEST_SYNAPTICS_PRESSUREPAD,
|
||||
.features = LITEST_TOUCHPAD | LITEST_CLICKPAD | LITEST_BUTTON,
|
||||
.interface = &interface,
|
||||
|
||||
.name = "SYNA2B31:00 06CB:CE37 Touchpad",
|
||||
.id = &input_id,
|
||||
.events = events,
|
||||
.absinfo = absinfo,
|
||||
)
|
||||
|
|
@ -350,7 +350,7 @@ END_TEST
|
|||
|
||||
START_TEST(zalloc_overflow)
|
||||
{
|
||||
zalloc(-1);
|
||||
zalloc((size_t)-1);
|
||||
}
|
||||
END_TEST
|
||||
|
||||
|
|
|
|||
|
|
@ -306,6 +306,7 @@ enum litest_device_type {
|
|||
LITEST_TABLET_MODE_UNRELIABLE,
|
||||
LITEST_KEYBOARD_LOGITECH_MEDIA_KEYBOARD_ELITE,
|
||||
LITEST_SONY_VAIO_KEYS,
|
||||
LITEST_SYNAPTICS_PRESSUREPAD,
|
||||
};
|
||||
|
||||
#define LITEST_DEVICELESS -2
|
||||
|
|
|
|||
|
|
@ -2765,6 +2765,9 @@ touchpad_has_palm_pressure(struct litest_device *dev)
|
|||
{
|
||||
struct libevdev *evdev = dev->evdev;
|
||||
|
||||
if (dev->which == LITEST_SYNAPTICS_PRESSUREPAD)
|
||||
return false;
|
||||
|
||||
if (libevdev_has_event_code(evdev, EV_ABS, ABS_MT_PRESSURE))
|
||||
return true;
|
||||
|
||||
|
|
|
|||
|
|
@ -1795,6 +1795,9 @@ touchpad_has_palm_pressure(struct litest_device *dev)
|
|||
{
|
||||
struct libevdev *evdev = dev->evdev;
|
||||
|
||||
if (dev->which == LITEST_SYNAPTICS_PRESSUREPAD)
|
||||
return false;
|
||||
|
||||
if (libevdev_has_event_code(evdev, EV_ABS, ABS_MT_PRESSURE))
|
||||
return true;
|
||||
|
||||
|
|
@ -5913,6 +5916,9 @@ touchpad_has_pressure(struct litest_device *dev)
|
|||
{
|
||||
struct libevdev *evdev = dev->evdev;
|
||||
|
||||
if (dev->which == LITEST_SYNAPTICS_PRESSUREPAD)
|
||||
return false;
|
||||
|
||||
if (libevdev_has_event_code(evdev, EV_ABS, ABS_MT_PRESSURE))
|
||||
return true;
|
||||
|
||||
|
|
|
|||
|
|
@ -218,7 +218,12 @@ def create_device_quirk(device):
|
|||
def setup_quirks(recording):
|
||||
devices = fetch(recording, 'devices')
|
||||
overrides = None
|
||||
quirks = [create_device_quirk(d) for d in devices if 'quirks' in d]
|
||||
quirks = []
|
||||
for d in devices:
|
||||
if 'quirks' in d:
|
||||
quirk = create_device_quirk(d)
|
||||
if quirk:
|
||||
quirks.append(quirk)
|
||||
if not quirks:
|
||||
return None
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
ACTION!="add|change", GOTO="libinput_device_group_end"
|
||||
ACTION=="remove", GOTO="libinput_device_group_end"
|
||||
KERNEL!="event[0-9]*", GOTO="libinput_device_group_end"
|
||||
|
||||
ATTRS{phys}=="?*", IMPORT{program}="@UDEV_TEST_PATH@libinput-device-group %S%p"
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
# This file contains lookup rules for libinput model-specific quirks.
|
||||
# IT IS NOT A STABLE API AND SUBJECT TO CHANGE AT ANY TIME
|
||||
|
||||
ACTION!="add|change", GOTO="libinput_fuzz_override_end"
|
||||
ACTION=="remove", GOTO="libinput_fuzz_override_end"
|
||||
KERNEL!="event*", GOTO="libinput_fuzz_override_end"
|
||||
|
||||
# Two-step process: fuzz-extract sets the LIBINPUT_FUZZ property and
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue