[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[Git][xorg-team/lib/libinput][upstream-unstable] 8 commits: touchpad: use the same speed for scrolling as the baseline of the accel curve



Title: GitLab

Timo Aaltonen pushed to branch upstream-unstable at X Strike Force / lib / libinput

Commits:

10 changed files:

Changes:

  • .gitlab-ci.yml
    ... ... @@ -42,7 +42,9 @@ include:
    42 42
     
    
    43 43
     stages:
    
    44 44
       - container_prep   # rebuild the container images if there is a change
    
    45
    -  - build            # for actually building things
    
    45
    +  - build            # for actually building and testing things in a container
    
    46
    +  - VM               # for running the test suite in a VM
    
    47
    +  - distro           # distribs test
    
    46 48
       - deploy           # trigger wayland's website generation
    
    47 49
       - container_clean  # clean up unused container images
    
    48 50
     
    
    ... ... @@ -390,7 +392,7 @@ freebsd:11.2@container-clean:
    390 392
       fi
    
    391 393
     
    
    392 394
     fedora:30@test-suite-vm:
    
    393
    -  stage: build
    
    395
    +  stage: VM
    
    394 396
       image: $QEMU_CONTAINER_IMAGE
    
    395 397
       tags:
    
    396 398
         - kvm
    
    ... ... @@ -408,7 +410,7 @@ fedora:30@test-suite-vm:
    408 410
         - ssh localhost -p 5555 "cd $CI_PROJECT_NAME ; meson \"$MESON_BUILDDIR\" $MESON_ARGS"
    
    409 411
         - ssh localhost -p 5555 "cd $CI_PROJECT_NAME ; meson configure \"$MESON_BUILDDIR\" "
    
    410 412
         - ssh localhost -p 5555 "cd $CI_PROJECT_NAME ; ninja -C \"$MESON_BUILDDIR\" $NINJA_ARGS"
    
    411
    -    - ssh localhost -p 5555 "cd $CI_PROJECT_NAME ; meson test -C \"$MESON_BUILDDIR\" --print-errorlogs" && touch .success || true
    
    413
    +    - ssh localhost -p 5555 "cd $CI_PROJECT_NAME ; meson test -C \"$MESON_BUILDDIR\" $MESON_TEST_ARGS --print-errorlogs" && touch .success || true
    
    412 414
     
    
    413 415
         # no matter the results of the tests, we want to fetch the logs
    
    414 416
         - scp -P 5555 -r localhost:$CI_PROJECT_NAME/$MESON_BUILDDIR .
    
    ... ... @@ -437,28 +439,39 @@ fedora:30@test-suite-vm:
    437 439
           - console.out
    
    438 440
     
    
    439 441
       allow_failure: true
    
    442
    +  needs: ['fedora:30@qemu-prep']
    
    440 443
     
    
    444
    +fedora:30@test-suite-vm-valgrind:
    
    445
    +  extends: fedora:30@test-suite-vm
    
    446
    +  variables:
    
    447
    +    MESON_TEST_ARGS: '--suite=valgrind --setup=valgrind'
    
    441 448
     
    
    442 449
     .fedora-build@template:
    
    443 450
       extends: .build@template
    
    444 451
       image: $FEDORA_CONTAINER_IMAGE
    
    445 452
     
    
    446 453
     fedora:29@default-build:
    
    454
    +  stage: distro
    
    447 455
       extends: .fedora-build@template
    
    448 456
       variables:
    
    449 457
         FEDORA_VERSION: 29
    
    458
    +  needs: ['fedora:29@container-prep']
    
    450 459
     
    
    451 460
     fedora:30@default-build:
    
    461
    +  stage: distro
    
    452 462
       extends: .fedora-build@template
    
    453 463
       variables:
    
    454 464
         FEDORA_VERSION: 30
    
    465
    +  needs: ['fedora:30@container-prep']
    
    455 466
     
    
    456 467
     fedora:30@default-build-release:
    
    468
    +  stage: distro
    
    457 469
       extends: .fedora-build@template
    
    458 470
       variables:
    
    459 471
         FEDORA_VERSION: 30
    
    460 472
         MESON_ARGS: "-Dbuildtype=release"
    
    461 473
         CFLAGS: "-Werror"
    
    474
    +  needs: ['fedora:30@container-prep']
    
    462 475
     
    
    463 476
     fedora:30@scan-build:
    
    464 477
       extends: .fedora-build@template
    
    ... ... @@ -472,6 +485,7 @@ fedora:30@scan-build:
    472 485
         - test $(find "$MESON_BUILDDIR"/meson-logs/scanbuild -maxdepth 0 ! -empty -exec echo "not empty" \; | wc -l) -eq 0 && exit 0
    
    473 486
         - echo "Check scan-build results"
    
    474 487
         - /bin/false
    
    488
    +  needs: ['fedora:30@container-prep']
    
    475 489
     
    
    476 490
     # Below jobs are build option combinations. We only
    
    477 491
     # run them on one image, they shouldn't fail on one distro
    
    ... ... @@ -482,6 +496,7 @@ fedora:30@build-no-libwacom:
    482 496
       variables:
    
    483 497
         FEDORA_VERSION: 30
    
    484 498
         MESON_ARGS: "-Dlibwacom=false"
    
    499
    +  needs: ['fedora:30@container-prep']
    
    485 500
     
    
    486 501
     fedora:30@build-no-libwacom-nodeps:
    
    487 502
       extends: .fedora-build@template
    
    ... ... @@ -490,12 +505,14 @@ fedora:30@build-no-libwacom-nodeps:
    490 505
         MESON_ARGS: "-Dlibwacom=false"
    
    491 506
       before_script:
    
    492 507
         - dnf remove -y libwacom libwacom-devel
    
    508
    +  needs: ['fedora:30@container-prep']
    
    493 509
     
    
    494 510
     fedora:30@build-no-docs:
    
    495 511
       extends: .fedora-build@template
    
    496 512
       variables:
    
    497 513
         FEDORA_VERSION: 30
    
    498 514
         MESON_ARGS: "-Ddocumentation=false"
    
    515
    +  needs: ['fedora:30@container-prep']
    
    499 516
     
    
    500 517
     fedora:30@build-no-docs-nodeps:
    
    501 518
       extends: .fedora-build@template
    
    ... ... @@ -504,12 +521,14 @@ fedora:30@build-no-docs-nodeps:
    504 521
         MESON_ARGS: "-Ddocumentation=false"
    
    505 522
       before_script:
    
    506 523
         - dnf remove -y doxygen graphviz
    
    524
    +  needs: ['fedora:30@container-prep']
    
    507 525
     
    
    508 526
     fedora:30@build-no-debuggui:
    
    509 527
       extends: .fedora-build@template
    
    510 528
       variables:
    
    511 529
         FEDORA_VERSION: 30
    
    512 530
         MESON_ARGS: "-Ddebug-gui=false"
    
    531
    +  needs: ['fedora:30@container-prep']
    
    513 532
     
    
    514 533
     fedora:30@build-no-debuggui-nodeps:
    
    515 534
       extends: .fedora-build@template
    
    ... ... @@ -518,12 +537,14 @@ fedora:30@build-no-debuggui-nodeps:
    518 537
         MESON_ARGS: "-Ddebug-gui=false"
    
    519 538
       before_script:
    
    520 539
         - dnf remove -y gtk3-devel
    
    540
    +  needs: ['fedora:30@container-prep']
    
    521 541
     
    
    522 542
     fedora:30@build-no-tests:
    
    523 543
       extends: .fedora-build@template
    
    524 544
       variables:
    
    525 545
         FEDORA_VERSION: 30
    
    526 546
         MESON_ARGS: "-Dtests=false"
    
    547
    +  needs: ['fedora:30@container-prep']
    
    527 548
     
    
    528 549
     fedora:30@build-no-tests-nodeps:
    
    529 550
       extends: .fedora-build@template
    
    ... ... @@ -532,6 +553,7 @@ fedora:30@build-no-tests-nodeps:
    532 553
         MESON_ARGS: "-Dtests=false"
    
    533 554
       before_script:
    
    534 555
         - dnf remove -y check-devel
    
    556
    +  needs: ['fedora:30@container-prep']
    
    535 557
     
    
    536 558
     fedora:30@valgrind:
    
    537 559
       extends: .fedora-build@template
    
    ... ... @@ -540,11 +562,14 @@ fedora:30@valgrind:
    540 562
         MESON_TEST_ARGS: '--suite=valgrind --no-suite=hardware --setup=valgrind'
    
    541 563
       before_script:
    
    542 564
         - dnf install -y valgrind
    
    565
    +  needs: ['fedora:30@container-prep']
    
    566
    +
    
    543 567
     #
    
    544 568
     # Ubuntu
    
    545 569
     #
    
    546 570
     
    
    547 571
     .ubuntu@template:
    
    572
    +  stage: distro
    
    548 573
       extends: .build@template
    
    549 574
       image: $UBUNTU_CONTAINER_IMAGE
    
    550 575
     
    
    ... ... @@ -552,26 +577,31 @@ ubuntu:18.10@default-build:
    552 577
       extends: .ubuntu@template
    
    553 578
       variables:
    
    554 579
         UBUNTU_VERSION: "18.10"
    
    580
    +  needs: ['ubuntu:18.10@container-prep']
    
    555 581
     
    
    556 582
     ubuntu:19.04@default-build:
    
    557 583
       extends: .ubuntu@template
    
    558 584
       variables:
    
    559 585
         UBUNTU_VERSION: "19.04"
    
    586
    +  needs: ['ubuntu:19.04@container-prep']
    
    560 587
     
    
    561 588
     #
    
    562 589
     # Arch
    
    563 590
     #
    
    564 591
     .arch@template:
    
    592
    +  stage: distro
    
    565 593
       extends: .build@template
    
    566 594
       image: $ARCH_CONTAINER_IMAGE
    
    567 595
     
    
    568 596
     arch:rolling@default-build:
    
    569 597
       extends: .arch@template
    
    598
    +  needs: ['arch:rolling@container-prep']
    
    570 599
     
    
    571 600
     #
    
    572 601
     # FreeBSD
    
    573 602
     #
    
    574 603
     .freebsd@template:
    
    604
    +  stage: distro
    
    575 605
       extends: .build@template
    
    576 606
       image: $FREEBSD_CONTAINER_IMAGE
    
    577 607
       variables:
    
    ... ... @@ -581,6 +611,7 @@ arch:rolling@default-build:
    581 611
     
    
    582 612
     freebsd:11.2@default-build:
    
    583 613
       extends: .freebsd@template
    
    614
    +  needs: ['freebsd:11.2@container-prep']
    
    584 615
     
    
    585 616
     #
    
    586 617
     # deploy
    

  • doc/user/conf.py.in
    ... ... @@ -167,10 +167,6 @@ texinfo_documents = [
    167 167
     
    
    168 168
     from recommonmark.parser import CommonMarkParser
    
    169 169
     
    
    170
    -source_parsers = {
    
    171
    -    '.md': CommonMarkParser,
    
    172
    -}
    
    173
    -
    
    174 170
     extlinks = { 'commit' :
    
    175 171
     		('https://gitlab.freedesktop.org/libinput/libinput/commit/%s',
    
    176 172
     			'git commit ')
    

  • meson.build
    1 1
     project('libinput', 'c',
    
    2
    -	version : '1.14.2',
    
    2
    +	version : '1.14.3',
    
    3 3
     	license : 'MIT/Expat',
    
    4 4
     	default_options : [ 'c_std=gnu99', 'warning_level=2' ],
    
    5 5
     	meson_version : '>= 0.41.0')
    

  • quirks/30-vendor-logitech.quirks
    ... ... @@ -55,3 +55,9 @@ ModelInvertHorizontalScrolling=1
    55 55
     MatchVendor=0x46D
    
    56 56
     MatchProduct=0x4082
    
    57 57
     ModelInvertHorizontalScrolling=1
    
    58
    +
    
    59
    +# MX Master 3 has a different PID on bluetooth
    
    60
    +[Logitech MX Master 3]
    
    61
    +MatchVendor=0x46D
    
    62
    +MatchProduct=0xB023
    
    63
    +ModelInvertHorizontalScrolling=1

  • src/evdev-fallback.c
    ... ... @@ -977,9 +977,7 @@ fallback_handle_state(struct fallback_dispatch *dispatch,
    977 977
     	if (dispatch->pending_event & EVDEV_ABSOLUTE_TOUCH_DOWN) {
    
    978 978
     		if (fallback_flush_st_down(dispatch, device, time))
    
    979 979
     			need_touch_frame = true;
    
    980
    -	}
    
    981
    -
    
    982
    -	if (dispatch->pending_event & EVDEV_ABSOLUTE_MOTION) {
    
    980
    +	} else if (dispatch->pending_event & EVDEV_ABSOLUTE_MOTION) {
    
    983 981
     		if (device->seat_caps & EVDEV_DEVICE_TOUCH) {
    
    984 982
     			if (fallback_flush_st_motion(dispatch,
    
    985 983
     						     device,
    

  • src/evdev-tablet.c
    ... ... @@ -1944,6 +1944,11 @@ tablet_proximity_out_quirk_timer_func(uint64_t now, void *data)
    1944 1944
     	};
    
    1945 1945
     	struct input_event *e;
    
    1946 1946
     
    
    1947
    +	if (tablet_has_status(tablet, TABLET_TOOL_IN_CONTACT)) {
    
    1948
    +		tablet_proximity_out_quirk_set_timer(tablet, now);
    
    1949
    +		return;
    
    1950
    +	}
    
    1951
    +
    
    1947 1952
     	if (tablet->quirks.last_event_time > now - FORCED_PROXOUT_TIMEOUT) {
    
    1948 1953
     		tablet_proximity_out_quirk_set_timer(tablet,
    
    1949 1954
     						     tablet->quirks.last_event_time);
    

  • src/filter-touchpad.c
    ... ... @@ -189,10 +189,19 @@ touchpad_constant_filter(struct motion_filter *filter,
    189 189
     	struct touchpad_accelerator *accel =
    
    190 190
     		(struct touchpad_accelerator *)filter;
    
    191 191
     	struct normalized_coords normalized;
    
    192
    +	/* We need to use the same baseline here as the accelerated code,
    
    193
    +	 * otherwise our unaccelerated speed is different to the accelerated
    
    194
    +	 * speed on the plateau.
    
    195
    +	 *
    
    196
    +	 * This is a hack, the baseline should be incorporated into the
    
    197
    +	 * TP_MAGIC_SLOWDOWN so we only have one number here but meanwhile
    
    198
    +	 * this will do.
    
    199
    +	 */
    
    200
    +	const double baseline = 0.9;
    
    192 201
     
    
    193 202
     	normalized = normalize_for_dpi(unaccelerated, accel->dpi);
    
    194
    -	normalized.x = TP_MAGIC_SLOWDOWN * normalized.x;
    
    195
    -	normalized.y = TP_MAGIC_SLOWDOWN * normalized.y;
    
    203
    +	normalized.x = baseline * TP_MAGIC_SLOWDOWN * normalized.x;
    
    204
    +	normalized.y = baseline * TP_MAGIC_SLOWDOWN * normalized.y;
    
    196 205
     
    
    197 206
     	return normalized;
    
    198 207
     }
    

  • test/test-tablet.c
    ... ... @@ -1534,6 +1534,42 @@ START_TEST(proximity_out_slow_event)
    1534 1534
     }
    
    1535 1535
     END_TEST
    
    1536 1536
     
    
    1537
    +START_TEST(proximity_out_not_during_contact)
    
    1538
    +{
    
    1539
    +	struct litest_device *dev = litest_current_device();
    
    1540
    +	struct libinput *li = dev->libinput;
    
    1541
    +	struct axis_replacement axes[] = {
    
    1542
    +		{ ABS_DISTANCE, 0 },
    
    1543
    +		{ ABS_PRESSURE, 10 },
    
    1544
    +		{ -1, -1 }
    
    1545
    +	};
    
    1546
    +
    
    1547
    +	litest_tablet_proximity_in(dev, 10, 10, axes);
    
    1548
    +	litest_tablet_motion(dev, 12, 12, axes);
    
    1549
    +	litest_drain_events(li);
    
    1550
    +
    
    1551
    +	litest_timeout_tablet_proxout();
    
    1552
    +	libinput_dispatch(li);
    
    1553
    +
    
    1554
    +	/* No forced proxout yet */
    
    1555
    +	litest_assert_empty_queue(li);
    
    1556
    +
    
    1557
    +	litest_axis_set_value(axes, ABS_PRESSURE, 0);
    
    1558
    +	litest_tablet_motion(dev, 14, 14, axes);
    
    1559
    +	litest_drain_events(li);
    
    1560
    +
    
    1561
    +	litest_timeout_tablet_proxout();
    
    1562
    +	libinput_dispatch(li);
    
    1563
    +
    
    1564
    +	/* The forced prox out */
    
    1565
    +	litest_assert_tablet_proximity_event(li,
    
    1566
    +					     LIBINPUT_TABLET_TOOL_PROXIMITY_STATE_OUT);
    
    1567
    +
    
    1568
    +	litest_tablet_proximity_out(dev);
    
    1569
    +	litest_assert_empty_queue(li);
    
    1570
    +}
    
    1571
    +END_TEST
    
    1572
    +
    
    1537 1573
     START_TEST(proximity_out_no_timeout)
    
    1538 1574
     {
    
    1539 1575
     	struct litest_device *dev = litest_current_device();
    
    ... ... @@ -5756,6 +5792,7 @@ TEST_COLLECTION(tablet)
    5756 5792
     	litest_add("tablet:proximity", proximity_range_button_press, LITEST_TABLET | LITEST_DISTANCE | LITEST_TOOL_MOUSE, LITEST_ANY);
    
    5757 5793
     	litest_add("tablet:proximity", proximity_range_button_release, LITEST_TABLET | LITEST_DISTANCE | LITEST_TOOL_MOUSE, LITEST_ANY);
    
    5758 5794
     	litest_add("tablet:proximity", proximity_out_slow_event, LITEST_TABLET | LITEST_DISTANCE, LITEST_ANY);
    
    5795
    +	litest_add("tablet:proximity", proximity_out_not_during_contact, LITEST_TABLET | LITEST_DISTANCE, LITEST_ANY);
    
    5759 5796
     	litest_add_for_device("tablet:proximity", proximity_out_no_timeout, LITEST_WACOM_ISDV4_4200_PEN);
    
    5760 5797
     
    
    5761 5798
     	litest_add_no_device("tablet:proximity", proximity_out_on_delete);
    

  • test/test-touch.c
    ... ... @@ -64,6 +64,25 @@ START_TEST(touch_frame_events)
    64 64
     }
    
    65 65
     END_TEST
    
    66 66
     
    
    67
    +START_TEST(touch_downup_no_motion)
    
    68
    +{
    
    69
    +	struct litest_device *dev = litest_current_device();
    
    70
    +	struct libinput *li = dev->libinput;
    
    71
    +
    
    72
    +	litest_drain_events(li);
    
    73
    +
    
    74
    +	litest_touch_down(dev, 0, 10, 10);
    
    75
    +	libinput_dispatch(li);
    
    76
    +
    
    77
    +	litest_assert_touch_down_frame(li);
    
    78
    +
    
    79
    +	litest_touch_up(dev, 0);
    
    80
    +	libinput_dispatch(li);
    
    81
    +
    
    82
    +	litest_assert_touch_up_frame(li);
    
    83
    +}
    
    84
    +END_TEST
    
    85
    +
    
    67 86
     START_TEST(touch_abs_transform)
    
    68 87
     {
    
    69 88
     	struct litest_device *dev;
    
    ... ... @@ -1322,6 +1341,8 @@ TEST_COLLECTION(touch)
    1322 1341
     	struct range axes = { ABS_X, ABS_Y + 1};
    
    1323 1342
     
    
    1324 1343
     	litest_add("touch:frame", touch_frame_events, LITEST_TOUCH, LITEST_ANY);
    
    1344
    +	litest_add("touch:down", touch_downup_no_motion, LITEST_TOUCH, LITEST_ANY);
    
    1345
    +	litest_add("touch:down", touch_downup_no_motion, LITEST_SINGLE_TOUCH, LITEST_TOUCHPAD);
    
    1325 1346
     	litest_add_no_device("touch:abs-transform", touch_abs_transform);
    
    1326 1347
     	litest_add("touch:slots", touch_seat_slot, LITEST_TOUCH, LITEST_TOUCHPAD);
    
    1327 1348
     	litest_add_no_device("touch:slots", touch_many_slots);
    

  • test/test-touchpad.c
    ... ... @@ -150,13 +150,13 @@ START_TEST(touchpad_2fg_scroll)
    150 150
     	litest_drain_events(li);
    
    151 151
     
    
    152 152
     	test_2fg_scroll(dev, 0.1, 40, false);
    
    153
    -	litest_assert_scroll(li, LIBINPUT_POINTER_AXIS_SCROLL_VERTICAL, 10);
    
    153
    +	litest_assert_scroll(li, LIBINPUT_POINTER_AXIS_SCROLL_VERTICAL, 9);
    
    154 154
     	test_2fg_scroll(dev, 0.1, -40, false);
    
    155
    -	litest_assert_scroll(li, LIBINPUT_POINTER_AXIS_SCROLL_VERTICAL, -10);
    
    155
    +	litest_assert_scroll(li, LIBINPUT_POINTER_AXIS_SCROLL_VERTICAL, -9);
    
    156 156
     	test_2fg_scroll(dev, 40, 0.1, false);
    
    157
    -	litest_assert_scroll(li, LIBINPUT_POINTER_AXIS_SCROLL_HORIZONTAL, 10);
    
    157
    +	litest_assert_scroll(li, LIBINPUT_POINTER_AXIS_SCROLL_HORIZONTAL, 9);
    
    158 158
     	test_2fg_scroll(dev, -40, 0.1, false);
    
    159
    -	litest_assert_scroll(li, LIBINPUT_POINTER_AXIS_SCROLL_HORIZONTAL, -10);
    
    159
    +	litest_assert_scroll(li, LIBINPUT_POINTER_AXIS_SCROLL_HORIZONTAL, -9);
    
    160 160
     
    
    161 161
     	/* 2fg scroll smaller than the threshold should not generate events */
    
    162 162
     	test_2fg_scroll(dev, 0.1, 0.1, true);
    
    ... ... @@ -602,13 +602,13 @@ START_TEST(touchpad_scroll_natural_2fg)
    602 602
     	libinput_device_config_scroll_set_natural_scroll_enabled(dev->libinput_device, 1);
    
    603 603
     
    
    604 604
     	test_2fg_scroll(dev, 0.1, 40, false);
    
    605
    -	litest_assert_scroll(li, LIBINPUT_POINTER_AXIS_SCROLL_VERTICAL, -10);
    
    605
    +	litest_assert_scroll(li, LIBINPUT_POINTER_AXIS_SCROLL_VERTICAL, -9);
    
    606 606
     	test_2fg_scroll(dev, 0.1, -40, false);
    
    607
    -	litest_assert_scroll(li, LIBINPUT_POINTER_AXIS_SCROLL_VERTICAL, 10);
    
    607
    +	litest_assert_scroll(li, LIBINPUT_POINTER_AXIS_SCROLL_VERTICAL, 9);
    
    608 608
     	test_2fg_scroll(dev, 40, 0.1, false);
    
    609
    -	litest_assert_scroll(li, LIBINPUT_POINTER_AXIS_SCROLL_HORIZONTAL, -10);
    
    609
    +	litest_assert_scroll(li, LIBINPUT_POINTER_AXIS_SCROLL_HORIZONTAL, -9);
    
    610 610
     	test_2fg_scroll(dev, -40, 0.1, false);
    
    611
    -	litest_assert_scroll(li, LIBINPUT_POINTER_AXIS_SCROLL_HORIZONTAL, 10);
    
    611
    +	litest_assert_scroll(li, LIBINPUT_POINTER_AXIS_SCROLL_HORIZONTAL, 9);
    
    612 612
     
    
    613 613
     }
    
    614 614
     END_TEST
    


  • Reply to: