Skip to content
Commits on Source (8)
......@@ -42,7 +42,9 @@ include:
stages:
- 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
- container_clean # clean up unused container images
......@@ -390,7 +392,7 @@ freebsd:11.2@container-clean:
fi
fedora:30@test-suite-vm:
stage: build
stage: VM
image: $QEMU_CONTAINER_IMAGE
tags:
- kvm
......@@ -408,7 +410,7 @@ fedora:30@test-suite-vm:
- 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\" --print-errorlogs" && touch .success || true
- 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 .
......@@ -437,28 +439,39 @@ fedora:30@test-suite-vm:
- 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:
extends: .build@template
image: $FEDORA_CONTAINER_IMAGE
fedora:29@default-build:
stage: distro
extends: .fedora-build@template
variables:
FEDORA_VERSION: 29
needs: ['fedora:29@container-prep']
fedora:30@default-build:
stage: distro
extends: .fedora-build@template
variables:
FEDORA_VERSION: 30
needs: ['fedora:30@container-prep']
fedora:30@default-build-release:
stage: distro
extends: .fedora-build@template
variables:
FEDORA_VERSION: 30
MESON_ARGS: "-Dbuildtype=release"
CFLAGS: "-Werror"
needs: ['fedora:30@container-prep']
fedora:30@scan-build:
extends: .fedora-build@template
......@@ -472,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
- echo "Check scan-build results"
- /bin/false
needs: ['fedora:30@container-prep']
# Below jobs are build option combinations. We only
# run them on one image, they shouldn't fail on one distro
......@@ -482,6 +496,7 @@ fedora:30@build-no-libwacom:
variables:
FEDORA_VERSION: 30
MESON_ARGS: "-Dlibwacom=false"
needs: ['fedora:30@container-prep']
fedora:30@build-no-libwacom-nodeps:
extends: .fedora-build@template
......@@ -490,12 +505,14 @@ fedora:30@build-no-libwacom-nodeps:
MESON_ARGS: "-Dlibwacom=false"
before_script:
- dnf remove -y libwacom libwacom-devel
needs: ['fedora:30@container-prep']
fedora:30@build-no-docs:
extends: .fedora-build@template
variables:
FEDORA_VERSION: 30
MESON_ARGS: "-Ddocumentation=false"
needs: ['fedora:30@container-prep']
fedora:30@build-no-docs-nodeps:
extends: .fedora-build@template
......@@ -504,12 +521,14 @@ fedora:30@build-no-docs-nodeps:
MESON_ARGS: "-Ddocumentation=false"
before_script:
- dnf remove -y doxygen graphviz
needs: ['fedora:30@container-prep']
fedora:30@build-no-debuggui:
extends: .fedora-build@template
variables:
FEDORA_VERSION: 30
MESON_ARGS: "-Ddebug-gui=false"
needs: ['fedora:30@container-prep']
fedora:30@build-no-debuggui-nodeps:
extends: .fedora-build@template
......@@ -518,12 +537,14 @@ fedora:30@build-no-debuggui-nodeps:
MESON_ARGS: "-Ddebug-gui=false"
before_script:
- dnf remove -y gtk3-devel
needs: ['fedora:30@container-prep']
fedora:30@build-no-tests:
extends: .fedora-build@template
variables:
FEDORA_VERSION: 30
MESON_ARGS: "-Dtests=false"
needs: ['fedora:30@container-prep']
fedora:30@build-no-tests-nodeps:
extends: .fedora-build@template
......@@ -532,6 +553,7 @@ fedora:30@build-no-tests-nodeps:
MESON_ARGS: "-Dtests=false"
before_script:
- dnf remove -y check-devel
needs: ['fedora:30@container-prep']
fedora:30@valgrind:
extends: .fedora-build@template
......@@ -540,11 +562,14 @@ fedora:30@valgrind:
MESON_TEST_ARGS: '--suite=valgrind --no-suite=hardware --setup=valgrind'
before_script:
- dnf install -y valgrind
needs: ['fedora:30@container-prep']
#
# Ubuntu
#
.ubuntu@template:
stage: distro
extends: .build@template
image: $UBUNTU_CONTAINER_IMAGE
......@@ -552,26 +577,31 @@ ubuntu:18.10@default-build:
extends: .ubuntu@template
variables:
UBUNTU_VERSION: "18.10"
needs: ['ubuntu:18.10@container-prep']
ubuntu:19.04@default-build:
extends: .ubuntu@template
variables:
UBUNTU_VERSION: "19.04"
needs: ['ubuntu:19.04@container-prep']
#
# Arch
#
.arch@template:
stage: distro
extends: .build@template
image: $ARCH_CONTAINER_IMAGE
arch:rolling@default-build:
extends: .arch@template
needs: ['arch:rolling@container-prep']
#
# FreeBSD
#
.freebsd@template:
stage: distro
extends: .build@template
image: $FREEBSD_CONTAINER_IMAGE
variables:
......@@ -581,6 +611,7 @@ arch:rolling@default-build:
freebsd:11.2@default-build:
extends: .freebsd@template
needs: ['freebsd:11.2@container-prep']
#
# deploy
......
......@@ -167,10 +167,6 @@ texinfo_documents = [
from recommonmark.parser import CommonMarkParser
source_parsers = {
'.md': CommonMarkParser,
}
extlinks = { 'commit' :
('https://gitlab.freedesktop.org/libinput/libinput/commit/%s',
'git commit ')
......
project('libinput', 'c',
version : '1.14.2',
version : '1.14.3',
license : 'MIT/Expat',
default_options : [ 'c_std=gnu99', 'warning_level=2' ],
meson_version : '>= 0.41.0')
......
......@@ -55,3 +55,9 @@ ModelInvertHorizontalScrolling=1
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
......@@ -977,9 +977,7 @@ fallback_handle_state(struct fallback_dispatch *dispatch,
if (dispatch->pending_event & EVDEV_ABSOLUTE_TOUCH_DOWN) {
if (fallback_flush_st_down(dispatch, device, time))
need_touch_frame = true;
}
if (dispatch->pending_event & EVDEV_ABSOLUTE_MOTION) {
} else if (dispatch->pending_event & EVDEV_ABSOLUTE_MOTION) {
if (device->seat_caps & EVDEV_DEVICE_TOUCH) {
if (fallback_flush_st_motion(dispatch,
device,
......
......@@ -1944,6 +1944,11 @@ tablet_proximity_out_quirk_timer_func(uint64_t now, void *data)
};
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) {
tablet_proximity_out_quirk_set_timer(tablet,
tablet->quirks.last_event_time);
......
......@@ -189,10 +189,19 @@ touchpad_constant_filter(struct motion_filter *filter,
struct touchpad_accelerator *accel =
(struct touchpad_accelerator *)filter;
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.x = TP_MAGIC_SLOWDOWN * normalized.x;
normalized.y = TP_MAGIC_SLOWDOWN * normalized.y;
normalized.x = baseline * TP_MAGIC_SLOWDOWN * normalized.x;
normalized.y = baseline * TP_MAGIC_SLOWDOWN * normalized.y;
return normalized;
}
......
......@@ -1534,6 +1534,42 @@ START_TEST(proximity_out_slow_event)
}
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)
{
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_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_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_no_device("tablet:proximity", proximity_out_on_delete);
......
......@@ -64,6 +64,25 @@ START_TEST(touch_frame_events)
}
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)
{
struct litest_device *dev;
......@@ -1322,6 +1341,8 @@ TEST_COLLECTION(touch)
struct range axes = { ABS_X, ABS_Y + 1};
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("touch:slots", touch_seat_slot, LITEST_TOUCH, LITEST_TOUCHPAD);
litest_add_no_device("touch:slots", touch_many_slots);
......
......@@ -150,13 +150,13 @@ START_TEST(touchpad_2fg_scroll)
litest_drain_events(li);
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);
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);
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);
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 */
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);
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);
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);
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);
litest_assert_scroll(li, LIBINPUT_POINTER_AXIS_SCROLL_HORIZONTAL, 10);
litest_assert_scroll(li, LIBINPUT_POINTER_AXIS_SCROLL_HORIZONTAL, 9);
}
END_TEST
......