mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-03-22 04:30:41 +01:00
Compare commits
20 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
94b5be448e | ||
|
|
39d353ddcb | ||
|
|
e4fdb5fe86 | ||
|
|
f634256ab0 | ||
|
|
65cfa032a0 | ||
|
|
68b471b31f | ||
|
|
47df5c173a | ||
|
|
e3d402fa3c | ||
|
|
f65b1a2e33 | ||
|
|
6dc9de071e | ||
|
|
fa10459082 | ||
|
|
34a7365235 | ||
|
|
62382f7d79 | ||
|
|
a7d2b749f3 | ||
|
|
c8daa2c0a1 | ||
|
|
093a87898b | ||
|
|
ad7708f6a5 | ||
|
|
b927b42235 | ||
|
|
b9ba9e7236 | ||
|
|
535cc9879b |
20 changed files with 339 additions and 27 deletions
117
.gitlab-ci.yml
117
.gitlab-ci.yml
|
|
@ -24,23 +24,27 @@
|
||||||
# <distribution>:<version>@activity:
|
# <distribution>:<version>@activity:
|
||||||
# e.g. fedora:29@build-default
|
# e.g. fedora:29@build-default
|
||||||
|
|
||||||
|
.templates_sha: &template_sha ff90ddcf059bfce35bd5f9b89a59d5d0c912b458 # see https://docs.gitlab.com/ee/ci/yaml/#includefile
|
||||||
|
|
||||||
include:
|
include:
|
||||||
# Arch container builder template
|
# Arch container builder template
|
||||||
- project: 'wayland/ci-templates'
|
- project: 'wayland/ci-templates'
|
||||||
ref: 955e61e67cf29327cf907432f668df9eec4ca6a2 # see https://docs.gitlab.com/ee/ci/yaml/#includefile
|
ref: *template_sha
|
||||||
file: '/templates/arch.yml'
|
file: '/templates/arch.yml'
|
||||||
# Fedora container builder template
|
# Fedora container builder template
|
||||||
- project: 'wayland/ci-templates'
|
- project: 'wayland/ci-templates'
|
||||||
ref: 955e61e67cf29327cf907432f668df9eec4ca6a2 # see https://docs.gitlab.com/ee/ci/yaml/#includefile
|
ref: *template_sha
|
||||||
file: '/templates/fedora.yml'
|
file: '/templates/fedora.yml'
|
||||||
# Ubuntu container builder template
|
# Ubuntu container builder template
|
||||||
- project: 'wayland/ci-templates'
|
- project: 'wayland/ci-templates'
|
||||||
ref: 955e61e67cf29327cf907432f668df9eec4ca6a2 # see https://docs.gitlab.com/ee/ci/yaml/#includefile
|
ref: *template_sha
|
||||||
file: '/templates/ubuntu.yml'
|
file: '/templates/ubuntu.yml'
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
- container_prep # rebuild the container images if there is a change
|
- container_prep # rebuild the container images if there is a change
|
||||||
- build # for actually building things
|
- build # for actually building and testing things in a container
|
||||||
|
- VM # for running the test suite in a VM
|
||||||
|
- distro # distribs test
|
||||||
- deploy # trigger wayland's website generation
|
- deploy # trigger wayland's website generation
|
||||||
- container_clean # clean up unused container images
|
- container_clean # clean up unused container images
|
||||||
|
|
||||||
|
|
@ -56,6 +60,7 @@ variables:
|
||||||
# https://wayland.freedesktop.org/libinput/doc/latest/building_libinput.html #
|
# https://wayland.freedesktop.org/libinput/doc/latest/building_libinput.html #
|
||||||
###############################################################################
|
###############################################################################
|
||||||
FEDORA_RPMS: 'git gcc gcc-c++ pkgconf-pkg-config meson check-devel libudev-devel libevdev-devel doxygen graphviz python3-sphinx python3-recommonmark libwacom-devel cairo-devel gtk3-devel glib2-devel mtdev-devel'
|
FEDORA_RPMS: 'git gcc gcc-c++ pkgconf-pkg-config meson check-devel libudev-devel libevdev-devel doxygen graphviz python3-sphinx python3-recommonmark libwacom-devel cairo-devel gtk3-devel glib2-devel mtdev-devel'
|
||||||
|
FEDORA_QEMU_RPMS: 'git gcc gcc-c++ pkgconf-pkg-config meson check-devel libudev-devel libevdev-devel doxygen graphviz python3-sphinx python3-recommonmark libwacom-devel cairo-devel gtk3-devel glib2-devel mtdev-devel diffutils valgrind'
|
||||||
UBUNTU_CUSTOM_DEBS: 'git gcc g++ pkg-config meson check libudev-dev libevdev-dev doxygen graphviz python3-sphinx python3-recommonmark python3-sphinx-rtd-theme libwacom-dev libcairo2-dev libgtk-3-dev libglib2.0-dev libmtdev-dev'
|
UBUNTU_CUSTOM_DEBS: 'git gcc g++ pkg-config meson check libudev-dev libevdev-dev doxygen graphviz python3-sphinx python3-recommonmark python3-sphinx-rtd-theme libwacom-dev libcairo2-dev libgtk-3-dev libglib2.0-dev libmtdev-dev'
|
||||||
ARCH_PKGS: 'git gcc pkgconfig meson check libsystemd libevdev doxygen graphviz python-sphinx python-recommonmark python-sphinx_rtd_theme libwacom gtk3 mtdev diffutils'
|
ARCH_PKGS: 'git gcc pkgconfig meson check libsystemd libevdev doxygen graphviz python-sphinx python-recommonmark python-sphinx_rtd_theme libwacom gtk3 mtdev diffutils'
|
||||||
FREEBSD_BUILD_PKGS: 'meson'
|
FREEBSD_BUILD_PKGS: 'meson'
|
||||||
|
|
@ -70,6 +75,7 @@ variables:
|
||||||
UBUNTU_TAG: '2019-08-07.0'
|
UBUNTU_TAG: '2019-08-07.0'
|
||||||
ARCH_TAG: '2019-08-07.0'
|
ARCH_TAG: '2019-08-07.0'
|
||||||
FREEBSD_TAG: '2019-08-07.0'
|
FREEBSD_TAG: '2019-08-07.0'
|
||||||
|
QEMU_TAG: 'qemu-vm-2019-10-04.0'
|
||||||
|
|
||||||
UBUNTU_EXEC: "bash .gitlab-ci/ubuntu_install.sh $UBUNTU_CUSTOM_DEBS"
|
UBUNTU_EXEC: "bash .gitlab-ci/ubuntu_install.sh $UBUNTU_CUSTOM_DEBS"
|
||||||
|
|
||||||
|
|
@ -79,6 +85,7 @@ variables:
|
||||||
UBUNTU_CONTAINER_IMAGE: $CI_REGISTRY_IMAGE/ubuntu/$UBUNTU_VERSION:$UBUNTU_TAG
|
UBUNTU_CONTAINER_IMAGE: $CI_REGISTRY_IMAGE/ubuntu/$UBUNTU_VERSION:$UBUNTU_TAG
|
||||||
ARCH_CONTAINER_IMAGE: $CI_REGISTRY_IMAGE/archlinux/rolling:$ARCH_TAG
|
ARCH_CONTAINER_IMAGE: $CI_REGISTRY_IMAGE/archlinux/rolling:$ARCH_TAG
|
||||||
FREEBSD_CONTAINER_IMAGE: $CI_REGISTRY_IMAGE/freebsd/11.2:$FREEBSD_TAG
|
FREEBSD_CONTAINER_IMAGE: $CI_REGISTRY_IMAGE/freebsd/11.2:$FREEBSD_TAG
|
||||||
|
QEMU_CONTAINER_IMAGE: $CI_REGISTRY_IMAGE/fedora/$FEDORA_VERSION:$QEMU_TAG
|
||||||
|
|
||||||
MESON_BUILDDIR: "build dir"
|
MESON_BUILDDIR: "build dir"
|
||||||
NINJA_ARGS: ''
|
NINJA_ARGS: ''
|
||||||
|
|
@ -137,6 +144,21 @@ variables:
|
||||||
skopeo inspect docker://$CI_REGISTRY_IMAGE/$IMAGE > /dev/null && exit 0 || true ;
|
skopeo inspect docker://$CI_REGISTRY_IMAGE/$IMAGE > /dev/null && exit 0 || true ;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
fedora:30@qemu-prep:
|
||||||
|
extends: .fedora@qemu-build
|
||||||
|
stage: container_prep
|
||||||
|
tags:
|
||||||
|
- kvm
|
||||||
|
variables:
|
||||||
|
GIT_STRATEGY: none
|
||||||
|
FEDORA_VERSION: 30
|
||||||
|
FEDORA_TAG: $QEMU_TAG
|
||||||
|
FEDORA_RPMS: $FEDORA_QEMU_RPMS
|
||||||
|
DISTRIB_FLAVOR: fedora
|
||||||
|
DISTRIB_VERSION: $FEDORA_VERSION
|
||||||
|
TAG: $QEMU_TAG
|
||||||
|
<<: *pull_upstream_or_rebuild
|
||||||
|
|
||||||
fedora:30@container-prep:
|
fedora:30@container-prep:
|
||||||
extends: .fedora@container-build
|
extends: .fedora@container-build
|
||||||
stage: container_prep
|
stage: container_prep
|
||||||
|
|
@ -361,26 +383,95 @@ freebsd:11.2@container-clean:
|
||||||
# Fedora
|
# Fedora
|
||||||
#
|
#
|
||||||
|
|
||||||
|
.check_tainted: &check_tainted |
|
||||||
|
# make sure the kernel is not tainted
|
||||||
|
if [[ "$(ssh localhost -p 5555 cat /proc/sys/kernel/tainted)" -gt 0 ]];
|
||||||
|
then
|
||||||
|
echo tainted kernel ;
|
||||||
|
exit 1 ;
|
||||||
|
fi
|
||||||
|
|
||||||
|
fedora:30@test-suite-vm:
|
||||||
|
stage: VM
|
||||||
|
image: $QEMU_CONTAINER_IMAGE
|
||||||
|
tags:
|
||||||
|
- kvm
|
||||||
|
variables:
|
||||||
|
FEDORA_VERSION: 30
|
||||||
|
MESON_BUILDDIR: build_dir
|
||||||
|
script:
|
||||||
|
# start our vm, no args required
|
||||||
|
- /app/start_vm.sh
|
||||||
|
|
||||||
|
- *check_tainted
|
||||||
|
|
||||||
|
- "scp -P 5555 -r $PWD localhost:"
|
||||||
|
- ssh localhost -p 5555 rm -rf $CI_PROJECT_NAME/"$MESON_BUILDDIR"
|
||||||
|
- ssh localhost -p 5555 "cd $CI_PROJECT_NAME ; meson \"$MESON_BUILDDIR\" $MESON_ARGS"
|
||||||
|
- ssh localhost -p 5555 "cd $CI_PROJECT_NAME ; meson configure \"$MESON_BUILDDIR\" "
|
||||||
|
- ssh localhost -p 5555 "cd $CI_PROJECT_NAME ; ninja -C \"$MESON_BUILDDIR\" $NINJA_ARGS"
|
||||||
|
- ssh localhost -p 5555 "cd $CI_PROJECT_NAME ; meson test -C \"$MESON_BUILDDIR\" $MESON_TEST_ARGS --print-errorlogs" && touch .success || true
|
||||||
|
|
||||||
|
# no matter the results of the tests, we want to fetch the logs
|
||||||
|
- scp -P 5555 -r localhost:$CI_PROJECT_NAME/$MESON_BUILDDIR .
|
||||||
|
|
||||||
|
- *check_tainted
|
||||||
|
|
||||||
|
- ssh localhost -p 5555 halt || true
|
||||||
|
- sleep 2
|
||||||
|
- kill $(pgrep qemu)
|
||||||
|
|
||||||
|
- if [[ ! -e .success ]] ;
|
||||||
|
then
|
||||||
|
exit 1 ;
|
||||||
|
fi
|
||||||
|
|
||||||
|
after_script:
|
||||||
|
# no matter the results of the tests, we want to kill the VM
|
||||||
|
- kill $(pgrep qemu)
|
||||||
|
|
||||||
|
artifacts:
|
||||||
|
name: "qemu-meson-logs-$CI_JOB_NAME"
|
||||||
|
when: always
|
||||||
|
expire_in: 1 week
|
||||||
|
paths:
|
||||||
|
- $MESON_BUILDDIR/meson-logs
|
||||||
|
- console.out
|
||||||
|
|
||||||
|
allow_failure: true
|
||||||
|
needs: ['fedora:30@qemu-prep']
|
||||||
|
|
||||||
|
fedora:30@test-suite-vm-valgrind:
|
||||||
|
extends: fedora:30@test-suite-vm
|
||||||
|
variables:
|
||||||
|
MESON_TEST_ARGS: '--suite=valgrind --setup=valgrind'
|
||||||
|
|
||||||
.fedora-build@template:
|
.fedora-build@template:
|
||||||
extends: .build@template
|
extends: .build@template
|
||||||
image: $FEDORA_CONTAINER_IMAGE
|
image: $FEDORA_CONTAINER_IMAGE
|
||||||
|
|
||||||
fedora:29@default-build:
|
fedora:29@default-build:
|
||||||
|
stage: distro
|
||||||
extends: .fedora-build@template
|
extends: .fedora-build@template
|
||||||
variables:
|
variables:
|
||||||
FEDORA_VERSION: 29
|
FEDORA_VERSION: 29
|
||||||
|
needs: ['fedora:29@container-prep']
|
||||||
|
|
||||||
fedora:30@default-build:
|
fedora:30@default-build:
|
||||||
|
stage: distro
|
||||||
extends: .fedora-build@template
|
extends: .fedora-build@template
|
||||||
variables:
|
variables:
|
||||||
FEDORA_VERSION: 30
|
FEDORA_VERSION: 30
|
||||||
|
needs: ['fedora:30@container-prep']
|
||||||
|
|
||||||
fedora:30@default-build-release:
|
fedora:30@default-build-release:
|
||||||
|
stage: distro
|
||||||
extends: .fedora-build@template
|
extends: .fedora-build@template
|
||||||
variables:
|
variables:
|
||||||
FEDORA_VERSION: 30
|
FEDORA_VERSION: 30
|
||||||
MESON_ARGS: "-Dbuildtype=release"
|
MESON_ARGS: "-Dbuildtype=release"
|
||||||
CFLAGS: "-Werror"
|
CFLAGS: "-Werror"
|
||||||
|
needs: ['fedora:30@container-prep']
|
||||||
|
|
||||||
fedora:30@scan-build:
|
fedora:30@scan-build:
|
||||||
extends: .fedora-build@template
|
extends: .fedora-build@template
|
||||||
|
|
@ -394,6 +485,7 @@ fedora:30@scan-build:
|
||||||
- test $(find "$MESON_BUILDDIR"/meson-logs/scanbuild -maxdepth 0 ! -empty -exec echo "not empty" \; | wc -l) -eq 0 && 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"
|
- echo "Check scan-build results"
|
||||||
- /bin/false
|
- /bin/false
|
||||||
|
needs: ['fedora:30@container-prep']
|
||||||
|
|
||||||
# Below jobs are build option combinations. We only
|
# Below jobs are build option combinations. We only
|
||||||
# run them on one image, they shouldn't fail on one distro
|
# run them on one image, they shouldn't fail on one distro
|
||||||
|
|
@ -404,6 +496,7 @@ fedora:30@build-no-libwacom:
|
||||||
variables:
|
variables:
|
||||||
FEDORA_VERSION: 30
|
FEDORA_VERSION: 30
|
||||||
MESON_ARGS: "-Dlibwacom=false"
|
MESON_ARGS: "-Dlibwacom=false"
|
||||||
|
needs: ['fedora:30@container-prep']
|
||||||
|
|
||||||
fedora:30@build-no-libwacom-nodeps:
|
fedora:30@build-no-libwacom-nodeps:
|
||||||
extends: .fedora-build@template
|
extends: .fedora-build@template
|
||||||
|
|
@ -412,12 +505,14 @@ fedora:30@build-no-libwacom-nodeps:
|
||||||
MESON_ARGS: "-Dlibwacom=false"
|
MESON_ARGS: "-Dlibwacom=false"
|
||||||
before_script:
|
before_script:
|
||||||
- dnf remove -y libwacom libwacom-devel
|
- dnf remove -y libwacom libwacom-devel
|
||||||
|
needs: ['fedora:30@container-prep']
|
||||||
|
|
||||||
fedora:30@build-no-docs:
|
fedora:30@build-no-docs:
|
||||||
extends: .fedora-build@template
|
extends: .fedora-build@template
|
||||||
variables:
|
variables:
|
||||||
FEDORA_VERSION: 30
|
FEDORA_VERSION: 30
|
||||||
MESON_ARGS: "-Ddocumentation=false"
|
MESON_ARGS: "-Ddocumentation=false"
|
||||||
|
needs: ['fedora:30@container-prep']
|
||||||
|
|
||||||
fedora:30@build-no-docs-nodeps:
|
fedora:30@build-no-docs-nodeps:
|
||||||
extends: .fedora-build@template
|
extends: .fedora-build@template
|
||||||
|
|
@ -426,12 +521,14 @@ fedora:30@build-no-docs-nodeps:
|
||||||
MESON_ARGS: "-Ddocumentation=false"
|
MESON_ARGS: "-Ddocumentation=false"
|
||||||
before_script:
|
before_script:
|
||||||
- dnf remove -y doxygen graphviz
|
- dnf remove -y doxygen graphviz
|
||||||
|
needs: ['fedora:30@container-prep']
|
||||||
|
|
||||||
fedora:30@build-no-debuggui:
|
fedora:30@build-no-debuggui:
|
||||||
extends: .fedora-build@template
|
extends: .fedora-build@template
|
||||||
variables:
|
variables:
|
||||||
FEDORA_VERSION: 30
|
FEDORA_VERSION: 30
|
||||||
MESON_ARGS: "-Ddebug-gui=false"
|
MESON_ARGS: "-Ddebug-gui=false"
|
||||||
|
needs: ['fedora:30@container-prep']
|
||||||
|
|
||||||
fedora:30@build-no-debuggui-nodeps:
|
fedora:30@build-no-debuggui-nodeps:
|
||||||
extends: .fedora-build@template
|
extends: .fedora-build@template
|
||||||
|
|
@ -440,12 +537,14 @@ fedora:30@build-no-debuggui-nodeps:
|
||||||
MESON_ARGS: "-Ddebug-gui=false"
|
MESON_ARGS: "-Ddebug-gui=false"
|
||||||
before_script:
|
before_script:
|
||||||
- dnf remove -y gtk3-devel
|
- dnf remove -y gtk3-devel
|
||||||
|
needs: ['fedora:30@container-prep']
|
||||||
|
|
||||||
fedora:30@build-no-tests:
|
fedora:30@build-no-tests:
|
||||||
extends: .fedora-build@template
|
extends: .fedora-build@template
|
||||||
variables:
|
variables:
|
||||||
FEDORA_VERSION: 30
|
FEDORA_VERSION: 30
|
||||||
MESON_ARGS: "-Dtests=false"
|
MESON_ARGS: "-Dtests=false"
|
||||||
|
needs: ['fedora:30@container-prep']
|
||||||
|
|
||||||
fedora:30@build-no-tests-nodeps:
|
fedora:30@build-no-tests-nodeps:
|
||||||
extends: .fedora-build@template
|
extends: .fedora-build@template
|
||||||
|
|
@ -454,6 +553,7 @@ fedora:30@build-no-tests-nodeps:
|
||||||
MESON_ARGS: "-Dtests=false"
|
MESON_ARGS: "-Dtests=false"
|
||||||
before_script:
|
before_script:
|
||||||
- dnf remove -y check-devel
|
- dnf remove -y check-devel
|
||||||
|
needs: ['fedora:30@container-prep']
|
||||||
|
|
||||||
fedora:30@valgrind:
|
fedora:30@valgrind:
|
||||||
extends: .fedora-build@template
|
extends: .fedora-build@template
|
||||||
|
|
@ -462,11 +562,14 @@ fedora:30@valgrind:
|
||||||
MESON_TEST_ARGS: '--suite=valgrind --no-suite=hardware --setup=valgrind'
|
MESON_TEST_ARGS: '--suite=valgrind --no-suite=hardware --setup=valgrind'
|
||||||
before_script:
|
before_script:
|
||||||
- dnf install -y valgrind
|
- dnf install -y valgrind
|
||||||
|
needs: ['fedora:30@container-prep']
|
||||||
|
|
||||||
#
|
#
|
||||||
# Ubuntu
|
# Ubuntu
|
||||||
#
|
#
|
||||||
|
|
||||||
.ubuntu@template:
|
.ubuntu@template:
|
||||||
|
stage: distro
|
||||||
extends: .build@template
|
extends: .build@template
|
||||||
image: $UBUNTU_CONTAINER_IMAGE
|
image: $UBUNTU_CONTAINER_IMAGE
|
||||||
|
|
||||||
|
|
@ -474,26 +577,31 @@ ubuntu:18.10@default-build:
|
||||||
extends: .ubuntu@template
|
extends: .ubuntu@template
|
||||||
variables:
|
variables:
|
||||||
UBUNTU_VERSION: "18.10"
|
UBUNTU_VERSION: "18.10"
|
||||||
|
needs: ['ubuntu:18.10@container-prep']
|
||||||
|
|
||||||
ubuntu:19.04@default-build:
|
ubuntu:19.04@default-build:
|
||||||
extends: .ubuntu@template
|
extends: .ubuntu@template
|
||||||
variables:
|
variables:
|
||||||
UBUNTU_VERSION: "19.04"
|
UBUNTU_VERSION: "19.04"
|
||||||
|
needs: ['ubuntu:19.04@container-prep']
|
||||||
|
|
||||||
#
|
#
|
||||||
# Arch
|
# Arch
|
||||||
#
|
#
|
||||||
.arch@template:
|
.arch@template:
|
||||||
|
stage: distro
|
||||||
extends: .build@template
|
extends: .build@template
|
||||||
image: $ARCH_CONTAINER_IMAGE
|
image: $ARCH_CONTAINER_IMAGE
|
||||||
|
|
||||||
arch:rolling@default-build:
|
arch:rolling@default-build:
|
||||||
extends: .arch@template
|
extends: .arch@template
|
||||||
|
needs: ['arch:rolling@container-prep']
|
||||||
|
|
||||||
#
|
#
|
||||||
# FreeBSD
|
# FreeBSD
|
||||||
#
|
#
|
||||||
.freebsd@template:
|
.freebsd@template:
|
||||||
|
stage: distro
|
||||||
extends: .build@template
|
extends: .build@template
|
||||||
image: $FREEBSD_CONTAINER_IMAGE
|
image: $FREEBSD_CONTAINER_IMAGE
|
||||||
variables:
|
variables:
|
||||||
|
|
@ -503,6 +611,7 @@ arch:rolling@default-build:
|
||||||
|
|
||||||
freebsd:11.2@default-build:
|
freebsd:11.2@default-build:
|
||||||
extends: .freebsd@template
|
extends: .freebsd@template
|
||||||
|
needs: ['freebsd:11.2@container-prep']
|
||||||
|
|
||||||
#
|
#
|
||||||
# deploy
|
# deploy
|
||||||
|
|
|
||||||
|
|
@ -167,10 +167,6 @@ texinfo_documents = [
|
||||||
|
|
||||||
from recommonmark.parser import CommonMarkParser
|
from recommonmark.parser import CommonMarkParser
|
||||||
|
|
||||||
source_parsers = {
|
|
||||||
'.md': CommonMarkParser,
|
|
||||||
}
|
|
||||||
|
|
||||||
extlinks = { 'commit' :
|
extlinks = { 'commit' :
|
||||||
('https://gitlab.freedesktop.org/libinput/libinput/commit/%s',
|
('https://gitlab.freedesktop.org/libinput/libinput/commit/%s',
|
||||||
'git commit ')
|
'git commit ')
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
project('libinput', 'c',
|
project('libinput', 'c',
|
||||||
version : '1.14.1',
|
version : '1.14.3',
|
||||||
license : 'MIT/Expat',
|
license : 'MIT/Expat',
|
||||||
default_options : [ 'c_std=gnu99', 'warning_level=2' ],
|
default_options : [ 'c_std=gnu99', 'warning_level=2' ],
|
||||||
meson_version : '>= 0.41.0')
|
meson_version : '>= 0.41.0')
|
||||||
|
|
|
||||||
|
|
@ -45,3 +45,19 @@ MatchBus=usb
|
||||||
MatchVendor=0x046D
|
MatchVendor=0x046D
|
||||||
MatchProduct=0x4011
|
MatchProduct=0x4011
|
||||||
AttrPalmPressureThreshold=400
|
AttrPalmPressureThreshold=400
|
||||||
|
|
||||||
|
[Logitech MX Master 2S]
|
||||||
|
MatchVendor=0x46D
|
||||||
|
MatchProduct=0x4069
|
||||||
|
ModelInvertHorizontalScrolling=1
|
||||||
|
|
||||||
|
[Logitech MX Master 3]
|
||||||
|
MatchVendor=0x46D
|
||||||
|
MatchProduct=0x4082
|
||||||
|
ModelInvertHorizontalScrolling=1
|
||||||
|
|
||||||
|
# MX Master 3 has a different PID on bluetooth
|
||||||
|
[Logitech MX Master 3]
|
||||||
|
MatchVendor=0x46D
|
||||||
|
MatchProduct=0xB023
|
||||||
|
ModelInvertHorizontalScrolling=1
|
||||||
|
|
|
||||||
|
|
@ -41,3 +41,21 @@ MatchDMIModalias=dmi:*svnHP:pnHPSpectrex360Convertible15-bl1XX:*
|
||||||
AttrPressureRange=55:40
|
AttrPressureRange=55:40
|
||||||
AttrThumbPressureThreshold=90
|
AttrThumbPressureThreshold=90
|
||||||
AttrPalmPressureThreshold=100
|
AttrPalmPressureThreshold=100
|
||||||
|
|
||||||
|
[HP Elite x2 1013 G3 Tablet Mode Switch]
|
||||||
|
MatchName=*Intel Virtual Button*
|
||||||
|
MatchDMIModalias=dmi:*svnHP:pnHPElitex21013G3:*
|
||||||
|
ModelTabletModeSwitchUnreliable=1
|
||||||
|
|
||||||
|
[HP Elite x2 1013 G3 Touchpad]
|
||||||
|
MatchUdevType=touchpad
|
||||||
|
MatchBus=usb
|
||||||
|
MatchVendor=0x044E
|
||||||
|
MatchProduct=0x1221
|
||||||
|
AttrTPKComboLayout=below
|
||||||
|
|
||||||
|
[HP Elite x2 1013 G3 Keyboard]
|
||||||
|
MatchUdevType=keyboard
|
||||||
|
MatchBus=ps2
|
||||||
|
MatchDMIModalias=dmi:*svnHP:pnHPElitex21013G3:*
|
||||||
|
AttrKeyboardIntegration=external
|
||||||
|
|
@ -5,6 +5,12 @@ MatchName=*Synaptics*
|
||||||
MatchDMIModalias=dmi:*svnLENOVO:*:pvrThinkPad*:*
|
MatchDMIModalias=dmi:*svnLENOVO:*:pvrThinkPad*:*
|
||||||
AttrThumbPressureThreshold=100
|
AttrThumbPressureThreshold=100
|
||||||
|
|
||||||
|
[Lenovo ThinkPad 13 2nd Generation TrackPoint]
|
||||||
|
MatchUdevType=pointingstick
|
||||||
|
MatchName=*ETPS/2 Elantech TrackPoint*
|
||||||
|
MatchDMIModalias=dmi:*svnLENOVO:*:pvrThinkPad132ndGen*
|
||||||
|
AttrTrackpointMultiplier=1.75
|
||||||
|
|
||||||
[Lenovo x230 Touchpad]
|
[Lenovo x230 Touchpad]
|
||||||
MatchName=*SynPS/2 Synaptics TouchPad
|
MatchName=*SynPS/2 Synaptics TouchPad
|
||||||
MatchDMIModalias=dmi:*svnLENOVO:*:pvrThinkPadX230*
|
MatchDMIModalias=dmi:*svnLENOVO:*:pvrThinkPadX230*
|
||||||
|
|
@ -30,6 +36,16 @@ MatchName=Elan Touchpad
|
||||||
MatchDMIModalias=dmi:*svnLENOVO:*:pvrThinkPadT480s*
|
MatchDMIModalias=dmi:*svnLENOVO:*:pvrThinkPadT480s*
|
||||||
ModelLenovoT480sTouchpad=1
|
ModelLenovoT480sTouchpad=1
|
||||||
|
|
||||||
|
[Lenovo T490s Touchpad]
|
||||||
|
MatchName=Elan Touchpad
|
||||||
|
MatchDMIModalias=dmi:*svnLENOVO:*:pvrThinkPadT490s*
|
||||||
|
ModelLenovoT490sTouchpad=1
|
||||||
|
|
||||||
|
[Lenovo T490s Trackpoint]
|
||||||
|
MatchName=*TPPS/2 IBM TrackPoint
|
||||||
|
MatchDMIModalias=dmi:*svnLENOVO:*:pvrThinkPadT490s:*
|
||||||
|
AttrTrackpointMultiplier=0.4
|
||||||
|
|
||||||
[Lenovo L380 Touchpad]
|
[Lenovo L380 Touchpad]
|
||||||
MatchName=Elan Touchpad
|
MatchName=Elan Touchpad
|
||||||
MatchDMIModalias=dmi:*svnLENOVO:*:pvrThinkPadL380*
|
MatchDMIModalias=dmi:*svnLENOVO:*:pvrThinkPadL380*
|
||||||
|
|
@ -146,6 +162,13 @@ MatchName=AT Translated Set 2 keyboard
|
||||||
MatchDMIModalias=dmi:*svnLENOVO:*pvrThinkPadX230Tablet:*
|
MatchDMIModalias=dmi:*svnLENOVO:*pvrThinkPadX230Tablet:*
|
||||||
ModelTabletModeNoSuspend=1
|
ModelTabletModeNoSuspend=1
|
||||||
|
|
||||||
|
# Special bezel button deactivation with
|
||||||
|
# keyboard also applies to X200 Tablet
|
||||||
|
[Lenovo X200 Tablet]
|
||||||
|
MatchName=AT Translated Set 2 keyboard
|
||||||
|
MatchDMIModalias=dmi:*svnLENOVO:*pvrThinkPadX200Tablet:*
|
||||||
|
ModelTabletModeNoSuspend=1
|
||||||
|
|
||||||
# Lenovo MIIX 720 comes with a detachable keyboard. We must not disable
|
# Lenovo MIIX 720 comes with a detachable keyboard. We must not disable
|
||||||
# the keyboard because some keys are still accessible on the screen and
|
# the keyboard because some keys are still accessible on the screen and
|
||||||
# volume rocker. See
|
# volume rocker. See
|
||||||
|
|
|
||||||
|
|
@ -977,9 +977,7 @@ fallback_handle_state(struct fallback_dispatch *dispatch,
|
||||||
if (dispatch->pending_event & EVDEV_ABSOLUTE_TOUCH_DOWN) {
|
if (dispatch->pending_event & EVDEV_ABSOLUTE_TOUCH_DOWN) {
|
||||||
if (fallback_flush_st_down(dispatch, device, time))
|
if (fallback_flush_st_down(dispatch, device, time))
|
||||||
need_touch_frame = true;
|
need_touch_frame = true;
|
||||||
}
|
} else if (dispatch->pending_event & EVDEV_ABSOLUTE_MOTION) {
|
||||||
|
|
||||||
if (dispatch->pending_event & EVDEV_ABSOLUTE_MOTION) {
|
|
||||||
if (device->seat_caps & EVDEV_DEVICE_TOUCH) {
|
if (device->seat_caps & EVDEV_DEVICE_TOUCH) {
|
||||||
if (fallback_flush_st_motion(dispatch,
|
if (fallback_flush_st_motion(dispatch,
|
||||||
device,
|
device,
|
||||||
|
|
|
||||||
|
|
@ -481,6 +481,12 @@ tp_gesture_handle_state_unknown(struct tp_dispatch *tp, uint64_t time)
|
||||||
double inner = 1.5; /* inner threshold in mm - count this touch */
|
double inner = 1.5; /* inner threshold in mm - count this touch */
|
||||||
double outer = 4.0; /* outer threshold in mm - ignore other touch */
|
double outer = 4.0; /* outer threshold in mm - ignore other touch */
|
||||||
|
|
||||||
|
/* If we have more fingers than slots, we don't know where the
|
||||||
|
* fingers are. Default to swipe */
|
||||||
|
if (tp->gesture.enabled && tp->gesture.finger_count > 2 &&
|
||||||
|
tp->gesture.finger_count > tp->num_slots)
|
||||||
|
return GESTURE_STATE_SWIPE;
|
||||||
|
|
||||||
/* Need more margin for error when there are more fingers */
|
/* Need more margin for error when there are more fingers */
|
||||||
outer += 2.0 * (tp->gesture.finger_count - 2);
|
outer += 2.0 * (tp->gesture.finger_count - 2);
|
||||||
inner += 0.5 * (tp->gesture.finger_count - 2);
|
inner += 0.5 * (tp->gesture.finger_count - 2);
|
||||||
|
|
|
||||||
|
|
@ -335,15 +335,18 @@ tp_thumb_update_multifinger(struct tp_dispatch *tp)
|
||||||
|
|
||||||
/* Position-based thumb detection: When a new touch arrives, check the
|
/* Position-based thumb detection: When a new touch arrives, check the
|
||||||
* two lowest touches. If they qualify for 2-finger scrolling, clear
|
* two lowest touches. If they qualify for 2-finger scrolling, clear
|
||||||
* thumb status. If not, mark the lower touch (based on pinch_eligible)
|
* thumb status.
|
||||||
* as either PINCH or SUPPRESSED.
|
*
|
||||||
|
* If they were in distinct diagonal position, then mark the lower
|
||||||
|
* touch (based on pinch_eligible) as either PINCH or SUPPRESSED. If
|
||||||
|
* we're too close together for a thumb, lift that.
|
||||||
*/
|
*/
|
||||||
if (mm.y > SCROLL_MM_Y) {
|
if (mm.y > SCROLL_MM_Y && mm.x > SCROLL_MM_X) {
|
||||||
if (tp->thumb.pinch_eligible)
|
if (tp->thumb.pinch_eligible)
|
||||||
tp_thumb_pinch(tp, first);
|
tp_thumb_pinch(tp, first);
|
||||||
else
|
else
|
||||||
tp_thumb_suppress(tp, first);
|
tp_thumb_suppress(tp, first);
|
||||||
} else {
|
} else if (mm.x < SCROLL_MM_X && mm.y < SCROLL_MM_Y) {
|
||||||
tp_thumb_lift(tp);
|
tp_thumb_lift(tp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1944,6 +1944,11 @@ tablet_proximity_out_quirk_timer_func(uint64_t now, void *data)
|
||||||
};
|
};
|
||||||
struct input_event *e;
|
struct input_event *e;
|
||||||
|
|
||||||
|
if (tablet_has_status(tablet, TABLET_TOOL_IN_CONTACT)) {
|
||||||
|
tablet_proximity_out_quirk_set_timer(tablet, now);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (tablet->quirks.last_event_time > now - FORCED_PROXOUT_TIMEOUT) {
|
if (tablet->quirks.last_event_time > now - FORCED_PROXOUT_TIMEOUT) {
|
||||||
tablet_proximity_out_quirk_set_timer(tablet,
|
tablet_proximity_out_quirk_set_timer(tablet,
|
||||||
tablet->quirks.last_event_time);
|
tablet->quirks.last_event_time);
|
||||||
|
|
|
||||||
10
src/evdev.c
10
src/evdev.c
|
|
@ -357,6 +357,11 @@ evdev_notify_axis(struct evdev_device *device,
|
||||||
struct normalized_coords delta = *delta_in;
|
struct normalized_coords delta = *delta_in;
|
||||||
struct discrete_coords discrete = *discrete_in;
|
struct discrete_coords discrete = *discrete_in;
|
||||||
|
|
||||||
|
if (device->scroll.invert_horizontal_scrolling) {
|
||||||
|
delta.x *= -1;
|
||||||
|
discrete.x *= -1;
|
||||||
|
}
|
||||||
|
|
||||||
if (device->scroll.natural_scrolling_enabled) {
|
if (device->scroll.natural_scrolling_enabled) {
|
||||||
delta.x *= -1;
|
delta.x *= -1;
|
||||||
delta.y *= -1;
|
delta.y *= -1;
|
||||||
|
|
@ -1841,6 +1846,10 @@ evdev_configure_device(struct evdev_device *device)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (evdev_device_has_model_quirk(device, QUIRK_MODEL_INVERT_HORIZONTAL_SCROLLING)) {
|
||||||
|
device->scroll.invert_horizontal_scrolling = true;
|
||||||
|
}
|
||||||
|
|
||||||
return fallback_dispatch_create(&device->base);
|
return fallback_dispatch_create(&device->base);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1953,6 +1962,7 @@ evdev_pre_configure_model_quirks(struct evdev_device *device)
|
||||||
* https://gitlab.freedesktop.org/libinput/libinput/issues/177 and
|
* https://gitlab.freedesktop.org/libinput/libinput/issues/177 and
|
||||||
* https://gitlab.freedesktop.org/libinput/libinput/issues/234 */
|
* https://gitlab.freedesktop.org/libinput/libinput/issues/234 */
|
||||||
if (evdev_device_has_model_quirk(device, QUIRK_MODEL_LENOVO_T480S_TOUCHPAD) ||
|
if (evdev_device_has_model_quirk(device, QUIRK_MODEL_LENOVO_T480S_TOUCHPAD) ||
|
||||||
|
evdev_device_has_model_quirk(device, QUIRK_MODEL_LENOVO_T490S_TOUCHPAD) ||
|
||||||
evdev_device_has_model_quirk(device, QUIRK_MODEL_LENOVO_L380_TOUCHPAD))
|
evdev_device_has_model_quirk(device, QUIRK_MODEL_LENOVO_L380_TOUCHPAD))
|
||||||
libevdev_enable_property(device->evdev,
|
libevdev_enable_property(device->evdev,
|
||||||
INPUT_PROP_BUTTONPAD);
|
INPUT_PROP_BUTTONPAD);
|
||||||
|
|
|
||||||
|
|
@ -216,6 +216,10 @@ struct evdev_device {
|
||||||
* used at runtime to enable/disable the feature */
|
* used at runtime to enable/disable the feature */
|
||||||
bool natural_scrolling_enabled;
|
bool natural_scrolling_enabled;
|
||||||
|
|
||||||
|
/* set during device init to invert direction of
|
||||||
|
* horizontal scrolling */
|
||||||
|
bool invert_horizontal_scrolling;
|
||||||
|
|
||||||
/* angle per REL_WHEEL click in degrees */
|
/* angle per REL_WHEEL click in degrees */
|
||||||
struct wheel_angle wheel_click_angle;
|
struct wheel_angle wheel_click_angle;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -189,10 +189,19 @@ touchpad_constant_filter(struct motion_filter *filter,
|
||||||
struct touchpad_accelerator *accel =
|
struct touchpad_accelerator *accel =
|
||||||
(struct touchpad_accelerator *)filter;
|
(struct touchpad_accelerator *)filter;
|
||||||
struct normalized_coords normalized;
|
struct normalized_coords normalized;
|
||||||
|
/* We need to use the same baseline here as the accelerated code,
|
||||||
|
* otherwise our unaccelerated speed is different to the accelerated
|
||||||
|
* speed on the plateau.
|
||||||
|
*
|
||||||
|
* This is a hack, the baseline should be incorporated into the
|
||||||
|
* TP_MAGIC_SLOWDOWN so we only have one number here but meanwhile
|
||||||
|
* this will do.
|
||||||
|
*/
|
||||||
|
const double baseline = 0.9;
|
||||||
|
|
||||||
normalized = normalize_for_dpi(unaccelerated, accel->dpi);
|
normalized = normalize_for_dpi(unaccelerated, accel->dpi);
|
||||||
normalized.x = TP_MAGIC_SLOWDOWN * normalized.x;
|
normalized.x = baseline * TP_MAGIC_SLOWDOWN * normalized.x;
|
||||||
normalized.y = TP_MAGIC_SLOWDOWN * normalized.y;
|
normalized.y = baseline * TP_MAGIC_SLOWDOWN * normalized.y;
|
||||||
|
|
||||||
return normalized;
|
return normalized;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -239,10 +239,12 @@ quirk_get_name(enum quirk q)
|
||||||
case QUIRK_MODEL_HP_PAVILION_DM4_TOUCHPAD: return "ModelHPPavilionDM4Touchpad";
|
case QUIRK_MODEL_HP_PAVILION_DM4_TOUCHPAD: return "ModelHPPavilionDM4Touchpad";
|
||||||
case QUIRK_MODEL_HP_STREAM11_TOUCHPAD: return "ModelHPStream11Touchpad";
|
case QUIRK_MODEL_HP_STREAM11_TOUCHPAD: return "ModelHPStream11Touchpad";
|
||||||
case QUIRK_MODEL_HP_ZBOOK_STUDIO_G3: return "ModelHPZBookStudioG3";
|
case QUIRK_MODEL_HP_ZBOOK_STUDIO_G3: return "ModelHPZBookStudioG3";
|
||||||
|
case QUIRK_MODEL_INVERT_HORIZONTAL_SCROLLING: return "ModelInvertHorizontalScrolling";
|
||||||
case QUIRK_MODEL_LENOVO_L380_TOUCHPAD: return "ModelLenovoL380Touchpad";
|
case QUIRK_MODEL_LENOVO_L380_TOUCHPAD: return "ModelLenovoL380Touchpad";
|
||||||
case QUIRK_MODEL_LENOVO_SCROLLPOINT: return "ModelLenovoScrollPoint";
|
case QUIRK_MODEL_LENOVO_SCROLLPOINT: return "ModelLenovoScrollPoint";
|
||||||
case QUIRK_MODEL_LENOVO_T450_TOUCHPAD: return "ModelLenovoT450Touchpad";
|
case QUIRK_MODEL_LENOVO_T450_TOUCHPAD: return "ModelLenovoT450Touchpad";
|
||||||
case QUIRK_MODEL_LENOVO_T480S_TOUCHPAD: return "ModelLenovoT480sTouchpad";
|
case QUIRK_MODEL_LENOVO_T480S_TOUCHPAD: return "ModelLenovoT480sTouchpad";
|
||||||
|
case QUIRK_MODEL_LENOVO_T490S_TOUCHPAD: return "ModelLenovoT490sTouchpad";
|
||||||
case QUIRK_MODEL_LENOVO_X230: return "ModelLenovoX230";
|
case QUIRK_MODEL_LENOVO_X230: return "ModelLenovoX230";
|
||||||
case QUIRK_MODEL_SYNAPTICS_SERIAL_TOUCHPAD: return "ModelSynapticsSerialTouchpad";
|
case QUIRK_MODEL_SYNAPTICS_SERIAL_TOUCHPAD: return "ModelSynapticsSerialTouchpad";
|
||||||
case QUIRK_MODEL_SYSTEM76_BONOBO: return "ModelSystem76Bonobo";
|
case QUIRK_MODEL_SYSTEM76_BONOBO: return "ModelSystem76Bonobo";
|
||||||
|
|
|
||||||
|
|
@ -71,10 +71,12 @@ enum quirk {
|
||||||
QUIRK_MODEL_HP_PAVILION_DM4_TOUCHPAD,
|
QUIRK_MODEL_HP_PAVILION_DM4_TOUCHPAD,
|
||||||
QUIRK_MODEL_HP_STREAM11_TOUCHPAD,
|
QUIRK_MODEL_HP_STREAM11_TOUCHPAD,
|
||||||
QUIRK_MODEL_HP_ZBOOK_STUDIO_G3,
|
QUIRK_MODEL_HP_ZBOOK_STUDIO_G3,
|
||||||
|
QUIRK_MODEL_INVERT_HORIZONTAL_SCROLLING,
|
||||||
QUIRK_MODEL_LENOVO_L380_TOUCHPAD,
|
QUIRK_MODEL_LENOVO_L380_TOUCHPAD,
|
||||||
QUIRK_MODEL_LENOVO_SCROLLPOINT,
|
QUIRK_MODEL_LENOVO_SCROLLPOINT,
|
||||||
QUIRK_MODEL_LENOVO_T450_TOUCHPAD,
|
QUIRK_MODEL_LENOVO_T450_TOUCHPAD,
|
||||||
QUIRK_MODEL_LENOVO_T480S_TOUCHPAD,
|
QUIRK_MODEL_LENOVO_T480S_TOUCHPAD,
|
||||||
|
QUIRK_MODEL_LENOVO_T490S_TOUCHPAD,
|
||||||
QUIRK_MODEL_LENOVO_X230,
|
QUIRK_MODEL_LENOVO_X230,
|
||||||
QUIRK_MODEL_SYNAPTICS_SERIAL_TOUCHPAD,
|
QUIRK_MODEL_SYNAPTICS_SERIAL_TOUCHPAD,
|
||||||
QUIRK_MODEL_SYSTEM76_BONOBO,
|
QUIRK_MODEL_SYSTEM76_BONOBO,
|
||||||
|
|
|
||||||
|
|
@ -77,7 +77,7 @@ struct litest_test_device {
|
||||||
const char *udev_rule;
|
const char *udev_rule;
|
||||||
const char *quirk_file;
|
const char *quirk_file;
|
||||||
|
|
||||||
const struct key_value_str udev_properties[];
|
const struct key_value_str udev_properties[32];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct litest_device_interface {
|
struct litest_device_interface {
|
||||||
|
|
|
||||||
|
|
@ -259,6 +259,58 @@ START_TEST(gestures_swipe_3fg_btntool)
|
||||||
}
|
}
|
||||||
END_TEST
|
END_TEST
|
||||||
|
|
||||||
|
START_TEST(gestures_swipe_3fg_btntool_pinch_like)
|
||||||
|
{
|
||||||
|
struct litest_device *dev = litest_current_device();
|
||||||
|
struct libinput *li = dev->libinput;
|
||||||
|
struct libinput_event *event;
|
||||||
|
struct libinput_event_gesture *gevent;
|
||||||
|
|
||||||
|
if (libevdev_get_num_slots(dev->evdev) > 2 ||
|
||||||
|
!libevdev_has_event_code(dev->evdev, EV_KEY, BTN_TOOL_TRIPLETAP) ||
|
||||||
|
!libinput_device_has_capability(dev->libinput_device,
|
||||||
|
LIBINPUT_DEVICE_CAP_GESTURE))
|
||||||
|
return;
|
||||||
|
|
||||||
|
litest_drain_events(li);
|
||||||
|
|
||||||
|
/* Technically a pinch position + pinch movement, but expect swipe
|
||||||
|
* for nfingers > nslots */
|
||||||
|
litest_touch_down(dev, 0, 20, 60);
|
||||||
|
litest_touch_down(dev, 1, 50, 20);
|
||||||
|
litest_event(dev, EV_KEY, BTN_TOOL_DOUBLETAP, 0);
|
||||||
|
litest_event(dev, EV_KEY, BTN_TOOL_TRIPLETAP, 1);
|
||||||
|
litest_event(dev, EV_SYN, SYN_REPORT, 0);
|
||||||
|
|
||||||
|
libinput_dispatch(li);
|
||||||
|
litest_touch_move_to(dev, 0, 20, 60, 10, 80, 20);
|
||||||
|
libinput_dispatch(li);
|
||||||
|
|
||||||
|
event = libinput_get_event(li);
|
||||||
|
gevent = litest_is_gesture_event(event,
|
||||||
|
LIBINPUT_EVENT_GESTURE_SWIPE_BEGIN,
|
||||||
|
3);
|
||||||
|
libinput_event_destroy(event);
|
||||||
|
|
||||||
|
while ((event = libinput_get_event(li)) != NULL) {
|
||||||
|
gevent = litest_is_gesture_event(event,
|
||||||
|
LIBINPUT_EVENT_GESTURE_SWIPE_UPDATE,
|
||||||
|
3);
|
||||||
|
libinput_event_destroy(event);
|
||||||
|
}
|
||||||
|
|
||||||
|
litest_touch_up(dev, 0);
|
||||||
|
litest_touch_up(dev, 1);
|
||||||
|
libinput_dispatch(li);
|
||||||
|
event = libinput_get_event(li);
|
||||||
|
gevent = litest_is_gesture_event(event,
|
||||||
|
LIBINPUT_EVENT_GESTURE_SWIPE_END,
|
||||||
|
3);
|
||||||
|
ck_assert(!libinput_event_gesture_get_cancelled(gevent));
|
||||||
|
libinput_event_destroy(event);
|
||||||
|
}
|
||||||
|
END_TEST
|
||||||
|
|
||||||
START_TEST(gestures_swipe_4fg)
|
START_TEST(gestures_swipe_4fg)
|
||||||
{
|
{
|
||||||
struct litest_device *dev = litest_current_device();
|
struct litest_device *dev = litest_current_device();
|
||||||
|
|
@ -1021,6 +1073,7 @@ TEST_COLLECTION(gestures)
|
||||||
|
|
||||||
litest_add_ranged("gestures:swipe", gestures_swipe_3fg, LITEST_TOUCHPAD, LITEST_SINGLE_TOUCH, &cardinals);
|
litest_add_ranged("gestures:swipe", gestures_swipe_3fg, LITEST_TOUCHPAD, LITEST_SINGLE_TOUCH, &cardinals);
|
||||||
litest_add_ranged("gestures:swipe", gestures_swipe_3fg_btntool, LITEST_TOUCHPAD, LITEST_SINGLE_TOUCH, &cardinals);
|
litest_add_ranged("gestures:swipe", gestures_swipe_3fg_btntool, LITEST_TOUCHPAD, LITEST_SINGLE_TOUCH, &cardinals);
|
||||||
|
litest_add("gestures:swipe", gestures_swipe_3fg_btntool_pinch_like, LITEST_TOUCHPAD, LITEST_SINGLE_TOUCH);
|
||||||
litest_add_ranged("gestures:swipe", gestures_swipe_4fg, LITEST_TOUCHPAD, LITEST_SINGLE_TOUCH, &cardinals);
|
litest_add_ranged("gestures:swipe", gestures_swipe_4fg, LITEST_TOUCHPAD, LITEST_SINGLE_TOUCH, &cardinals);
|
||||||
litest_add_ranged("gestures:swipe", gestures_swipe_4fg_btntool, LITEST_TOUCHPAD, LITEST_SINGLE_TOUCH, &cardinals);
|
litest_add_ranged("gestures:swipe", gestures_swipe_4fg_btntool, LITEST_TOUCHPAD, LITEST_SINGLE_TOUCH, &cardinals);
|
||||||
litest_add_ranged("gestures:pinch", gestures_pinch, LITEST_TOUCHPAD, LITEST_SINGLE_TOUCH, &cardinals);
|
litest_add_ranged("gestures:pinch", gestures_pinch, LITEST_TOUCHPAD, LITEST_SINGLE_TOUCH, &cardinals);
|
||||||
|
|
|
||||||
|
|
@ -1534,6 +1534,42 @@ START_TEST(proximity_out_slow_event)
|
||||||
}
|
}
|
||||||
END_TEST
|
END_TEST
|
||||||
|
|
||||||
|
START_TEST(proximity_out_not_during_contact)
|
||||||
|
{
|
||||||
|
struct litest_device *dev = litest_current_device();
|
||||||
|
struct libinput *li = dev->libinput;
|
||||||
|
struct axis_replacement axes[] = {
|
||||||
|
{ ABS_DISTANCE, 0 },
|
||||||
|
{ ABS_PRESSURE, 10 },
|
||||||
|
{ -1, -1 }
|
||||||
|
};
|
||||||
|
|
||||||
|
litest_tablet_proximity_in(dev, 10, 10, axes);
|
||||||
|
litest_tablet_motion(dev, 12, 12, axes);
|
||||||
|
litest_drain_events(li);
|
||||||
|
|
||||||
|
litest_timeout_tablet_proxout();
|
||||||
|
libinput_dispatch(li);
|
||||||
|
|
||||||
|
/* No forced proxout yet */
|
||||||
|
litest_assert_empty_queue(li);
|
||||||
|
|
||||||
|
litest_axis_set_value(axes, ABS_PRESSURE, 0);
|
||||||
|
litest_tablet_motion(dev, 14, 14, axes);
|
||||||
|
litest_drain_events(li);
|
||||||
|
|
||||||
|
litest_timeout_tablet_proxout();
|
||||||
|
libinput_dispatch(li);
|
||||||
|
|
||||||
|
/* The forced prox out */
|
||||||
|
litest_assert_tablet_proximity_event(li,
|
||||||
|
LIBINPUT_TABLET_TOOL_PROXIMITY_STATE_OUT);
|
||||||
|
|
||||||
|
litest_tablet_proximity_out(dev);
|
||||||
|
litest_assert_empty_queue(li);
|
||||||
|
}
|
||||||
|
END_TEST
|
||||||
|
|
||||||
START_TEST(proximity_out_no_timeout)
|
START_TEST(proximity_out_no_timeout)
|
||||||
{
|
{
|
||||||
struct litest_device *dev = litest_current_device();
|
struct litest_device *dev = litest_current_device();
|
||||||
|
|
@ -5756,6 +5792,7 @@ TEST_COLLECTION(tablet)
|
||||||
litest_add("tablet:proximity", proximity_range_button_press, LITEST_TABLET | LITEST_DISTANCE | LITEST_TOOL_MOUSE, LITEST_ANY);
|
litest_add("tablet:proximity", proximity_range_button_press, LITEST_TABLET | LITEST_DISTANCE | LITEST_TOOL_MOUSE, LITEST_ANY);
|
||||||
litest_add("tablet:proximity", proximity_range_button_release, LITEST_TABLET | LITEST_DISTANCE | LITEST_TOOL_MOUSE, LITEST_ANY);
|
litest_add("tablet:proximity", proximity_range_button_release, LITEST_TABLET | LITEST_DISTANCE | LITEST_TOOL_MOUSE, LITEST_ANY);
|
||||||
litest_add("tablet:proximity", proximity_out_slow_event, LITEST_TABLET | LITEST_DISTANCE, LITEST_ANY);
|
litest_add("tablet:proximity", proximity_out_slow_event, LITEST_TABLET | LITEST_DISTANCE, LITEST_ANY);
|
||||||
|
litest_add("tablet:proximity", proximity_out_not_during_contact, LITEST_TABLET | LITEST_DISTANCE, LITEST_ANY);
|
||||||
litest_add_for_device("tablet:proximity", proximity_out_no_timeout, LITEST_WACOM_ISDV4_4200_PEN);
|
litest_add_for_device("tablet:proximity", proximity_out_no_timeout, LITEST_WACOM_ISDV4_4200_PEN);
|
||||||
|
|
||||||
litest_add_no_device("tablet:proximity", proximity_out_on_delete);
|
litest_add_no_device("tablet:proximity", proximity_out_on_delete);
|
||||||
|
|
|
||||||
|
|
@ -64,6 +64,25 @@ START_TEST(touch_frame_events)
|
||||||
}
|
}
|
||||||
END_TEST
|
END_TEST
|
||||||
|
|
||||||
|
START_TEST(touch_downup_no_motion)
|
||||||
|
{
|
||||||
|
struct litest_device *dev = litest_current_device();
|
||||||
|
struct libinput *li = dev->libinput;
|
||||||
|
|
||||||
|
litest_drain_events(li);
|
||||||
|
|
||||||
|
litest_touch_down(dev, 0, 10, 10);
|
||||||
|
libinput_dispatch(li);
|
||||||
|
|
||||||
|
litest_assert_touch_down_frame(li);
|
||||||
|
|
||||||
|
litest_touch_up(dev, 0);
|
||||||
|
libinput_dispatch(li);
|
||||||
|
|
||||||
|
litest_assert_touch_up_frame(li);
|
||||||
|
}
|
||||||
|
END_TEST
|
||||||
|
|
||||||
START_TEST(touch_abs_transform)
|
START_TEST(touch_abs_transform)
|
||||||
{
|
{
|
||||||
struct litest_device *dev;
|
struct litest_device *dev;
|
||||||
|
|
@ -1322,6 +1341,8 @@ TEST_COLLECTION(touch)
|
||||||
struct range axes = { ABS_X, ABS_Y + 1};
|
struct range axes = { ABS_X, ABS_Y + 1};
|
||||||
|
|
||||||
litest_add("touch:frame", touch_frame_events, LITEST_TOUCH, LITEST_ANY);
|
litest_add("touch:frame", touch_frame_events, LITEST_TOUCH, LITEST_ANY);
|
||||||
|
litest_add("touch:down", touch_downup_no_motion, LITEST_TOUCH, LITEST_ANY);
|
||||||
|
litest_add("touch:down", touch_downup_no_motion, LITEST_SINGLE_TOUCH, LITEST_TOUCHPAD);
|
||||||
litest_add_no_device("touch:abs-transform", touch_abs_transform);
|
litest_add_no_device("touch:abs-transform", touch_abs_transform);
|
||||||
litest_add("touch:slots", touch_seat_slot, LITEST_TOUCH, LITEST_TOUCHPAD);
|
litest_add("touch:slots", touch_seat_slot, LITEST_TOUCH, LITEST_TOUCHPAD);
|
||||||
litest_add_no_device("touch:slots", touch_many_slots);
|
litest_add_no_device("touch:slots", touch_many_slots);
|
||||||
|
|
|
||||||
|
|
@ -150,13 +150,13 @@ START_TEST(touchpad_2fg_scroll)
|
||||||
litest_drain_events(li);
|
litest_drain_events(li);
|
||||||
|
|
||||||
test_2fg_scroll(dev, 0.1, 40, false);
|
test_2fg_scroll(dev, 0.1, 40, false);
|
||||||
litest_assert_scroll(li, LIBINPUT_POINTER_AXIS_SCROLL_VERTICAL, 10);
|
litest_assert_scroll(li, LIBINPUT_POINTER_AXIS_SCROLL_VERTICAL, 9);
|
||||||
test_2fg_scroll(dev, 0.1, -40, false);
|
test_2fg_scroll(dev, 0.1, -40, false);
|
||||||
litest_assert_scroll(li, LIBINPUT_POINTER_AXIS_SCROLL_VERTICAL, -10);
|
litest_assert_scroll(li, LIBINPUT_POINTER_AXIS_SCROLL_VERTICAL, -9);
|
||||||
test_2fg_scroll(dev, 40, 0.1, false);
|
test_2fg_scroll(dev, 40, 0.1, false);
|
||||||
litest_assert_scroll(li, LIBINPUT_POINTER_AXIS_SCROLL_HORIZONTAL, 10);
|
litest_assert_scroll(li, LIBINPUT_POINTER_AXIS_SCROLL_HORIZONTAL, 9);
|
||||||
test_2fg_scroll(dev, -40, 0.1, false);
|
test_2fg_scroll(dev, -40, 0.1, false);
|
||||||
litest_assert_scroll(li, LIBINPUT_POINTER_AXIS_SCROLL_HORIZONTAL, -10);
|
litest_assert_scroll(li, LIBINPUT_POINTER_AXIS_SCROLL_HORIZONTAL, -9);
|
||||||
|
|
||||||
/* 2fg scroll smaller than the threshold should not generate events */
|
/* 2fg scroll smaller than the threshold should not generate events */
|
||||||
test_2fg_scroll(dev, 0.1, 0.1, true);
|
test_2fg_scroll(dev, 0.1, 0.1, true);
|
||||||
|
|
@ -602,13 +602,13 @@ START_TEST(touchpad_scroll_natural_2fg)
|
||||||
libinput_device_config_scroll_set_natural_scroll_enabled(dev->libinput_device, 1);
|
libinput_device_config_scroll_set_natural_scroll_enabled(dev->libinput_device, 1);
|
||||||
|
|
||||||
test_2fg_scroll(dev, 0.1, 40, false);
|
test_2fg_scroll(dev, 0.1, 40, false);
|
||||||
litest_assert_scroll(li, LIBINPUT_POINTER_AXIS_SCROLL_VERTICAL, -10);
|
litest_assert_scroll(li, LIBINPUT_POINTER_AXIS_SCROLL_VERTICAL, -9);
|
||||||
test_2fg_scroll(dev, 0.1, -40, false);
|
test_2fg_scroll(dev, 0.1, -40, false);
|
||||||
litest_assert_scroll(li, LIBINPUT_POINTER_AXIS_SCROLL_VERTICAL, 10);
|
litest_assert_scroll(li, LIBINPUT_POINTER_AXIS_SCROLL_VERTICAL, 9);
|
||||||
test_2fg_scroll(dev, 40, 0.1, false);
|
test_2fg_scroll(dev, 40, 0.1, false);
|
||||||
litest_assert_scroll(li, LIBINPUT_POINTER_AXIS_SCROLL_HORIZONTAL, -10);
|
litest_assert_scroll(li, LIBINPUT_POINTER_AXIS_SCROLL_HORIZONTAL, -9);
|
||||||
test_2fg_scroll(dev, -40, 0.1, false);
|
test_2fg_scroll(dev, -40, 0.1, false);
|
||||||
litest_assert_scroll(li, LIBINPUT_POINTER_AXIS_SCROLL_HORIZONTAL, 10);
|
litest_assert_scroll(li, LIBINPUT_POINTER_AXIS_SCROLL_HORIZONTAL, 9);
|
||||||
|
|
||||||
}
|
}
|
||||||
END_TEST
|
END_TEST
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue