mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-04-01 16:20:35 +02:00
Compare commits
6 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cc9a4debd3 | ||
|
|
c75e052ad4 | ||
|
|
429fc47bb1 | ||
|
|
b6ce9c0f3b | ||
|
|
40439b7347 | ||
|
|
d1a575c8e5 |
6 changed files with 219 additions and 9 deletions
151
circle.yml
Normal file
151
circle.yml
Normal file
|
|
@ -0,0 +1,151 @@
|
||||||
|
# vim: set expandtab shiftwidth=2 tabstop=8 textwidth=0:
|
||||||
|
|
||||||
|
libinput_jobs:
|
||||||
|
default_settings: &default_settings
|
||||||
|
working_directory: ~/libinput
|
||||||
|
# Define a couple of standardized build targets
|
||||||
|
# that we call from every build container
|
||||||
|
build_and_test_default: &build_and_test_default
|
||||||
|
name: Build
|
||||||
|
command: |
|
||||||
|
rm -rf build
|
||||||
|
meson build ${MESON_PARAMS}
|
||||||
|
mesonconf build
|
||||||
|
ninja -v -C build ${NINJA_ARGS}
|
||||||
|
environment:
|
||||||
|
MESON_PARAMS: --prefix=/opt/libinput
|
||||||
|
build_and_test: &build_and_test
|
||||||
|
run:
|
||||||
|
<<: *build_and_test_default
|
||||||
|
build_no_libwacom: &build_no_libwacom
|
||||||
|
run:
|
||||||
|
<<: *build_and_test_default
|
||||||
|
name: Build - No libwacom
|
||||||
|
environment:
|
||||||
|
MESON_PARAMS: -Dlibwacom=false
|
||||||
|
build_no_debug_gui: &build_no_debug_gui
|
||||||
|
run:
|
||||||
|
<<: *build_and_test_default
|
||||||
|
name: Build - No debug-gui
|
||||||
|
environment:
|
||||||
|
MESON_PARAMS: -Ddebug-gui=false
|
||||||
|
build_no_tests: &build_no_tests
|
||||||
|
run:
|
||||||
|
<<: *build_and_test_default
|
||||||
|
name: Build - No tests
|
||||||
|
environment:
|
||||||
|
MESON_PARAMS: -Dtests=false
|
||||||
|
build_no_docs: &build_no_docs
|
||||||
|
run:
|
||||||
|
<<: *build_and_test_default
|
||||||
|
name: Build - No docs
|
||||||
|
environment:
|
||||||
|
MESON_PARAMS: -Ddocumentation=false
|
||||||
|
ninja_scan_build: &ninja_scan_build
|
||||||
|
run:
|
||||||
|
<<: *build_and_test_default
|
||||||
|
name: Ninja scan-build
|
||||||
|
environment:
|
||||||
|
NINJA_ARGS: scan-build
|
||||||
|
install: &install
|
||||||
|
run:
|
||||||
|
name: Installing
|
||||||
|
command: ninja -v -C build install
|
||||||
|
export_logs: &export_logs
|
||||||
|
store_artifacts:
|
||||||
|
path: ~/libinput/build/meson-logs
|
||||||
|
|
||||||
|
# Ubuntu's meson is too old, these instructions are
|
||||||
|
# meson-specific
|
||||||
|
meson_from_git: &meson_from_git
|
||||||
|
run:
|
||||||
|
name: Install meson from git
|
||||||
|
environment:
|
||||||
|
MESON_VERSION: 0.41.0
|
||||||
|
command: |
|
||||||
|
git clone https://github.com/mesonbuild/meson
|
||||||
|
pushd meson
|
||||||
|
git checkout -f ${MESON_VERSION}
|
||||||
|
python3 ./setup.py install --prefix=/usr --install-layout=deb --install-lib=/usr/share/meson --install-scripts=/usr/share/meson
|
||||||
|
popd
|
||||||
|
rm -rf meson
|
||||||
|
|
||||||
|
fedora_install: &fedora_install
|
||||||
|
run:
|
||||||
|
name: Install prerequisites
|
||||||
|
command: |
|
||||||
|
dnf install -y git gcc gcc-c++ meson check-devel libudev-devel libevdev-devel doxygen graphviz valgrind binutils libwacom-devel cairo-devel gtk3-devel glib2-devel mtdev-devel
|
||||||
|
|
||||||
|
fedora_build_all: &fedora_build_all
|
||||||
|
<<: *default_settings
|
||||||
|
steps:
|
||||||
|
- *fedora_install
|
||||||
|
- checkout
|
||||||
|
- *build_and_test
|
||||||
|
- *install
|
||||||
|
- *export_logs
|
||||||
|
- *build_no_libwacom
|
||||||
|
- *build_no_debug_gui
|
||||||
|
- *build_no_tests
|
||||||
|
- *build_no_docs
|
||||||
|
|
||||||
|
ubuntu_install: &ubuntu_install
|
||||||
|
run:
|
||||||
|
name: Install prerequisites
|
||||||
|
command: |
|
||||||
|
apt-get update
|
||||||
|
apt-get install -y software-properties-common
|
||||||
|
add-apt-repository universe
|
||||||
|
apt-get update
|
||||||
|
apt-get install -y git gcc g++ meson check libudev-dev libevdev-dev doxygen graphviz valgrind binutils libwacom-dev libcairo2-dev libgtk-3-dev libglib2.0-dev libmtdev-dev
|
||||||
|
|
||||||
|
ubuntu_build_all: &ubuntu_build_all
|
||||||
|
<<: *default_settings
|
||||||
|
steps:
|
||||||
|
- *ubuntu_install
|
||||||
|
- *meson_from_git # meson version not recent enough
|
||||||
|
- checkout
|
||||||
|
- *build_and_test
|
||||||
|
- *install
|
||||||
|
- *export_logs
|
||||||
|
- *build_no_libwacom
|
||||||
|
- *build_no_debug_gui
|
||||||
|
- *build_no_tests
|
||||||
|
- *build_no_docs
|
||||||
|
|
||||||
|
scan_build_run: &scan_build_run
|
||||||
|
<<: *default_settings
|
||||||
|
steps:
|
||||||
|
- *fedora_install
|
||||||
|
- run:
|
||||||
|
name: Install clang and find
|
||||||
|
command: dnf install -y clang-analyzer findutils
|
||||||
|
- checkout
|
||||||
|
- *ninja_scan_build
|
||||||
|
- *export_logs
|
||||||
|
- run:
|
||||||
|
name: Check scan-build results
|
||||||
|
command: test ! -d ~/libinput/build/meson-logs/scanbuild || test $(find ~/libinput/build/meson-logs/scanbuild -maxdepth 0 ! -empty -exec echo "not empty" \; | wc -l) -eq 0 || (echo "Check scan-build results" && false)
|
||||||
|
|
||||||
|
version: 2
|
||||||
|
jobs:
|
||||||
|
fedora_latest:
|
||||||
|
<<: *fedora_build_all
|
||||||
|
docker:
|
||||||
|
- image: fedora:latest
|
||||||
|
ubuntu_17_04:
|
||||||
|
<<: *ubuntu_build_all
|
||||||
|
docker:
|
||||||
|
- image: ubuntu:zesty
|
||||||
|
scan_build:
|
||||||
|
<<: *scan_build_run
|
||||||
|
docker:
|
||||||
|
- image: fedora:latest
|
||||||
|
|
||||||
|
workflows:
|
||||||
|
version: 2
|
||||||
|
compile:
|
||||||
|
jobs:
|
||||||
|
- fedora_latest
|
||||||
|
- scan_build
|
||||||
|
- ubuntu_17_04
|
||||||
|
|
@ -2,7 +2,7 @@ AC_PREREQ([2.64])
|
||||||
|
|
||||||
m4_define([libinput_major_version], [1])
|
m4_define([libinput_major_version], [1])
|
||||||
m4_define([libinput_minor_version], [8])
|
m4_define([libinput_minor_version], [8])
|
||||||
m4_define([libinput_micro_version], [0])
|
m4_define([libinput_micro_version], [1])
|
||||||
m4_define([libinput_version],
|
m4_define([libinput_version],
|
||||||
[libinput_major_version.libinput_minor_version.libinput_micro_version])
|
[libinput_major_version.libinput_minor_version.libinput_micro_version])
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -26,15 +26,29 @@ $> sudo ninja -C builddir/ install
|
||||||
$> sudo udevadm hwdb --update
|
$> sudo udevadm hwdb --update
|
||||||
@endcode
|
@endcode
|
||||||
|
|
||||||
The ```prefix``` option or other options can be changed later with the
|
Additional options may also be specified. For example:
|
||||||
```mesonconf``` command.
|
|
||||||
|
|
||||||
@code
|
@code
|
||||||
$> mesonconf builddir/ -Dprefix=/some/other/prefix
|
$> meson --prefix=/usr -Ddocumentation=false -Dlibwacom=false builddir/
|
||||||
|
@endcode
|
||||||
|
|
||||||
|
The ```prefix``` or other options can be changed later with the
|
||||||
|
```mesonconf``` command. For example:
|
||||||
|
@code
|
||||||
|
$> mesonconf builddir/ -Dprefix=/some/other/prefix -Ddocumentation=true
|
||||||
$> ninja -C builddir
|
$> ninja -C builddir
|
||||||
$> sudo ninja -C builddir/ install
|
$> sudo ninja -C builddir/ install
|
||||||
@endcode
|
@endcode
|
||||||
|
|
||||||
|
Running ``mesonconf builddir/`` with no other arguments lists all
|
||||||
|
configurable options meson provides.
|
||||||
|
|
||||||
|
To rebuild from scratch, simply remove the build directory and run meson
|
||||||
|
again:
|
||||||
|
@code
|
||||||
|
$> rm -r builddir/
|
||||||
|
$> meson --prefix=....
|
||||||
|
@endcode
|
||||||
|
|
||||||
@subsection building_autotools Building with automake
|
@subsection building_autotools Building with automake
|
||||||
|
|
||||||
libinput currently also provides the autotools build system, but this will
|
libinput currently also provides the autotools build system, but this will
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
project('libinput', 'c', 'cpp',
|
project('libinput', 'c', 'cpp',
|
||||||
version : '1.8.0',
|
version : '1.8.1',
|
||||||
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.40.0')
|
meson_version : '>= 0.40.0')
|
||||||
|
|
@ -62,6 +62,8 @@ if have_libwacom
|
||||||
name : 'libwacom_get_paired_device check',
|
name : 'libwacom_get_paired_device check',
|
||||||
dependencies : dep_libwacom)
|
dependencies : dep_libwacom)
|
||||||
config_h.set10('HAVE_LIBWACOM_GET_PAIRED_DEVICE', result)
|
config_h.set10('HAVE_LIBWACOM_GET_PAIRED_DEVICE', result)
|
||||||
|
else
|
||||||
|
dep_libwacom = declare_dependency()
|
||||||
endif
|
endif
|
||||||
|
|
||||||
############ udev bits ############
|
############ udev bits ############
|
||||||
|
|
|
||||||
|
|
@ -1740,6 +1740,7 @@ tp_interface_device_removed(struct evdev_device *device,
|
||||||
libinput_device_remove_event_listener(
|
libinput_device_remove_event_listener(
|
||||||
&tp->dwt.keyboard_listener);
|
&tp->dwt.keyboard_listener);
|
||||||
tp->dwt.keyboard = NULL;
|
tp->dwt.keyboard = NULL;
|
||||||
|
tp->dwt.keyboard_active = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (removed_device == tp->lid_switch.lid_switch) {
|
if (removed_device == tp->lid_switch.lid_switch) {
|
||||||
|
|
@ -2278,12 +2279,12 @@ tp_init_palmdetect_edge(struct tp_dispatch *tp,
|
||||||
if (width < 70.0)
|
if (width < 70.0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* palm edges are 5% of the width on each side */
|
/* palm edges are 8% of the width on each side */
|
||||||
mm.x = width * 0.05;
|
mm.x = width * 0.08;
|
||||||
edges = evdev_device_mm_to_units(device, &mm);
|
edges = evdev_device_mm_to_units(device, &mm);
|
||||||
tp->palm.left_edge = edges.x;
|
tp->palm.left_edge = edges.x;
|
||||||
|
|
||||||
mm.x = width * 0.95;
|
mm.x = width * 0.92;
|
||||||
edges = evdev_device_mm_to_units(device, &mm);
|
edges = evdev_device_mm_to_units(device, &mm);
|
||||||
tp->palm.right_edge = edges.x;
|
tp->palm.right_edge = edges.x;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3819,6 +3819,47 @@ START_TEST(touchpad_dwt_enable_during_tap)
|
||||||
}
|
}
|
||||||
END_TEST
|
END_TEST
|
||||||
|
|
||||||
|
START_TEST(touchpad_dwt_remove_kbd_while_active)
|
||||||
|
{
|
||||||
|
struct litest_device *touchpad = litest_current_device();
|
||||||
|
struct litest_device *keyboard;
|
||||||
|
struct libinput *li = touchpad->libinput;
|
||||||
|
|
||||||
|
if (!has_disable_while_typing(touchpad))
|
||||||
|
return;
|
||||||
|
|
||||||
|
litest_enable_tap(touchpad->libinput_device);
|
||||||
|
enable_dwt(touchpad);
|
||||||
|
|
||||||
|
keyboard = dwt_init_paired_keyboard(li, touchpad);
|
||||||
|
litest_drain_events(li);
|
||||||
|
|
||||||
|
litest_keyboard_key(keyboard, KEY_A, true);
|
||||||
|
litest_keyboard_key(keyboard, KEY_A, false);
|
||||||
|
libinput_dispatch(li);
|
||||||
|
|
||||||
|
litest_touch_down(touchpad, 0, 50, 50);
|
||||||
|
libinput_dispatch(li);
|
||||||
|
|
||||||
|
litest_keyboard_key(keyboard, KEY_A, true);
|
||||||
|
litest_keyboard_key(keyboard, KEY_A, false);
|
||||||
|
litest_drain_events(li);
|
||||||
|
|
||||||
|
litest_delete_device(keyboard);
|
||||||
|
litest_drain_events(li);
|
||||||
|
|
||||||
|
litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 10, 1);
|
||||||
|
litest_touch_up(touchpad, 0);
|
||||||
|
litest_assert_empty_queue(li);
|
||||||
|
|
||||||
|
litest_touch_down(touchpad, 0, 50, 50);
|
||||||
|
litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 10, 1);
|
||||||
|
litest_touch_up(touchpad, 0);
|
||||||
|
litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_MOTION);
|
||||||
|
|
||||||
|
}
|
||||||
|
END_TEST
|
||||||
|
|
||||||
START_TEST(touchpad_dwt_apple)
|
START_TEST(touchpad_dwt_apple)
|
||||||
{
|
{
|
||||||
struct litest_device *touchpad = litest_current_device();
|
struct litest_device *touchpad = litest_current_device();
|
||||||
|
|
@ -5071,6 +5112,7 @@ litest_setup_tests_touchpad(void)
|
||||||
litest_add("touchpad:dwt", touchpad_dwt_enable_during_touch, LITEST_TOUCHPAD, LITEST_ANY);
|
litest_add("touchpad:dwt", touchpad_dwt_enable_during_touch, LITEST_TOUCHPAD, LITEST_ANY);
|
||||||
litest_add("touchpad:dwt", touchpad_dwt_enable_before_touch, LITEST_TOUCHPAD, LITEST_ANY);
|
litest_add("touchpad:dwt", touchpad_dwt_enable_before_touch, LITEST_TOUCHPAD, LITEST_ANY);
|
||||||
litest_add("touchpad:dwt", touchpad_dwt_enable_during_tap, LITEST_TOUCHPAD, LITEST_ANY);
|
litest_add("touchpad:dwt", touchpad_dwt_enable_during_tap, LITEST_TOUCHPAD, LITEST_ANY);
|
||||||
|
litest_add("touchpad:dwt", touchpad_dwt_remove_kbd_while_active, LITEST_TOUCHPAD, LITEST_ANY);
|
||||||
litest_add_for_device("touchpad:dwt", touchpad_dwt_apple, LITEST_BCM5974);
|
litest_add_for_device("touchpad:dwt", touchpad_dwt_apple, LITEST_BCM5974);
|
||||||
litest_add_for_device("touchpad:dwt", touchpad_dwt_acer_hawaii, LITEST_ACER_HAWAII_TOUCHPAD);
|
litest_add_for_device("touchpad:dwt", touchpad_dwt_acer_hawaii, LITEST_ACER_HAWAII_TOUCHPAD);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue