...
 
Commits (35)
This diff is collapsed.
......@@ -31,4 +31,4 @@ This copy is provided to provide consistent behavior regardless which kernel
version libinput is compiled against. The header is used during compilation
only, libinput does not link against GPL libraries.
[1] http://cgit.freedesktop.org/wayland/libinput/tree/include/linux/input.h
[1] https://gitlab.freedesktop.org/libinput/libinput/blob/master/include/linux/input.h
......@@ -11,6 +11,17 @@ provide the common set of functionality that users expect. Input event
processing includes scaling touch coordinates, generating
relative pointer events from touchpads, pointer acceleration, etc.
User documentation
------------------
Documentation explaining features available in libinput is available
[here](https://wayland.freedesktop.org/libinput/doc/latest/pages.html).
This includes the [FAQ](https://wayland.freedesktop.org/libinput/doc/latest/faq.html)
and the instructions on
[reporting bugs](https://wayland.freedesktop.org/libinput/doc/latest/reporting_bugs.html).
Architecture
------------
......@@ -40,19 +51,19 @@ Source code
-----------
The source code of libinput can be found at:
http://cgit.freedesktop.org/wayland/libinput
https://gitlab.freedesktop.org/libinput/libinput
For a list of current and past releases visit:
http://www.freedesktop.org/wiki/Software/libinput/
https://www.freedesktop.org/wiki/Software/libinput/
Build instructions:
http://wayland.freedesktop.org/libinput/doc/latest/building_libinput.html
https://wayland.freedesktop.org/libinput/doc/latest/building_libinput.html
Reporting Bugs
--------------
Bugs can be filed in the libinput component of Wayland:
https://bugs.freedesktop.org/enter_bug.cgi?product=Wayland&component=libinput
Bugs can be filed on freedesktop.org GitLab:
https://gitlab.freedesktop.org/libinput/libinput/issues/
Where possible, please provide the `libinput record` output
of the input device and/or the event sequence in question.
......@@ -62,19 +73,19 @@ See @ref reporting_bugs for more info.
Documentation
-------------
- Developer API documentation: http://wayland.freedesktop.org/libinput/doc/latest/modules.html
- Developer API documentation: https://wayland.freedesktop.org/libinput/doc/latest/modules.html
- High-level documentation about libinput's features:
http://wayland.freedesktop.org/libinput/doc/latest/pages.html
https://wayland.freedesktop.org/libinput/doc/latest/pages.html
- Build instructions:
http://wayland.freedesktop.org/libinput/doc/latest/building_libinput.html
https://wayland.freedesktop.org/libinput/doc/latest/building_libinput.html
- Documentation for previous versions of libinput: https://wayland.freedesktop.org/libinput/doc/
Examples of how to use libinput are the debugging tools in the libinput
repository. Developers are encouraged to look at those tools for a
real-world (yet simple) example on how to use libinput.
- A commandline debugging tool: https://cgit.freedesktop.org/wayland/libinput/tree/tools/libinput-debug-events.c
- A GTK application that draws cursor/touch/tablet positions: https://cgit.freedesktop.org/wayland/libinput/tree/tools/libinput-debug-gui.c
- A commandline debugging tool: https://gitlab.freedesktop.org/libinput/libinput/tree/master/tools/libinput-debug-events.c
- A GTK application that draws cursor/touch/tablet positions: https://gitlab.freedesktop.org/libinput/libinput/tree/master/tools/libinput-debug-gui.c
License
-------
......@@ -88,5 +99,5 @@ libinput is licensed under the MIT license.
> 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: [...]
See the [COPYING](http://cgit.freedesktop.org/wayland/libinput/tree/COPYING)
See the [COPYING](https://gitlab.freedesktop.org/libinput/libinput/tree/master/COPYING)
file for the full license information.
......@@ -18,7 +18,7 @@ process below. A successful build requires the @ref
building_dependencies to be installed before running meson.
@code
$> git clone git://anongit.freedesktop.org/git/wayland/libinput
$> git clone https://gitlab.freedesktop.org/libinput/libinput
$> cd libinput
$> meson --prefix=/usr builddir/
$> ninja -C builddir/
......@@ -117,9 +117,18 @@ This issue is tracked in https://github.com/mesonbuild/meson/issues/1967.
@subsection building_dependencies Build dependencies
libinput has a few build-time dependencies that must be installed prior to
running configure. In most cases, it is sufficient to install the
dependencies that your distribution uses to build the libinput package.
These can be installed with one of the following commands:
running configure.
@note The build dependencies for some distributions can be found in the
<a href="https://gitlab.freedesktop.org/libinput/libinput/blob/master/.gitlab-ci.yml">
GitLab Continuous Integration file</a>. Search for <b>FEDORA_RPMS</b> in the
<b>variables:</b> definition and check the list for an entry for your
distribution.
In most cases, it is sufficient to install the dependencies that your
distribution uses to build the libinput package. These can be installed
with one of the following commands:
<ul>
<li><b>Debian/Ubuntu</b> based distributions: ```sudo apt-get build-dep
......@@ -189,7 +198,7 @@ requires the @ref building_dependencies to be installed at configure
time.
@code
$> git clone git://anongit.freedesktop.org/git/wayland/libinput
$> git clone https://gitlab.freedesktop.org/libinput/libinput
$> cd libinput
$> ./autogen.sh --prefix=/usr --libdir=/usr/lib64
$> make
......
......@@ -220,4 +220,27 @@ 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).
@section faq_wayland Is libinput required for Wayland?
Technically - no. But for your use-case - probably.
Wayland is a display server communication protocol. libinput is a low-level
library to simplify handling input devices and their events. They have no
direct connection. As a technical analogy, the question is similar to "is
glibc required for HTTP", or (stretching the analogy a bit further) "Is a
pen required to write English". No, it isn't.
You can use libinput without a Wayland compositor, you can
write a Wayland compositor without libinput. Until 2018 the most common use
of libinput is with the X.Org X server through the xf86-input-libinput
driver. As Wayland compositors become more commonplace they will eventually
overtake X.
So why "for your use-case - probably"? All general-purpose Wayland
compositors use libinput for their input stack. Wayland compositors that
are more specialized (e.g. in-vehicle infotainment or IVI) can handle input
devices directly but the compositor you want to use
on your desktop needs an input stack that is more complex. And right now,
libinput is the only input stack that exists for this use-case.
*/
......@@ -49,7 +49,7 @@ the udev property <b>MOUSE_DPI</b> for this information. This property is usuall
set via the <a
href="http://cgit.freedesktop.org/systemd/systemd/tree/hwdb/70-mouse.hwdb">udev hwdb</a>.
The "mouse-dpi-tool" utility provided by <a
href="http://freedesktop.org/wiki/Software/libevdev/">libevdev</a> should be
href="https://freedesktop.org/wiki/Software/libevdev/">libevdev</a> should be
used to measure a device's resolution.
The format of the property for single-resolution mice is:
......
......@@ -35,6 +35,10 @@
- @subpage tablet-support
@page other_devices Other devices
- @subpage switches
@page general General
- @subpage udev_config
......
......@@ -12,7 +12,7 @@ users.
@section ptraccel-profiles Pointer acceleration profiles
The profile decides the general method of pointer acceleration.
libinput currently supports two profiles: "adaptive" and "flat". The aptive
libinput currently supports two profiles: "adaptive" and "flat". The adaptive
profile is the default profile for all devices and takes the current speed
of the device into account when deciding on acceleration. The flat profile
is simply a constant factor applied to all device deltas, regardless of the
......
......@@ -2,7 +2,7 @@
@page reporting_bugs Reporting bugs
A new bug can be filed here:
https://bugs.freedesktop.org/enter_bug.cgi?product=Wayland&component=libinput
https://gitlab.freedesktop.org/libinput/libinput
When reporting bugs against libinput, please follow the instructions below
and provide the required data. You will need:
......@@ -182,7 +182,7 @@ E: USEC_INITIALIZED=5463031
@note Where available, the @ref libinput-record tools should be used instead
of evemu
<a href="http://www.freedesktop.org/wiki/Evemu/">evemu</a> records the
<a href="https://www.freedesktop.org/wiki/Evemu/">evemu</a> records the
device capabilities together with the event stream from the kernel. On our
side, this allows us to recreate a virtual device identical to your device
and re-play the event sequence, hopefully triggering the same bug.
......
/**
@page switches Switches
libinput supports a couple of switches. Unlike button events that come in
press and release pairs, switches are usually toggled once and left at the
setting for an extended period of time.
libinput supports the lid and tablet-mode switches. Unlike button events
that come in press and release pairs, switches are usually toggled once and
left at the setting for an extended period of time.
Only some switches are handled by libinput, see @ref libinput_switch for a
list of supported switches. Switch events are exposed to the caller, but
......
......@@ -15,7 +15,7 @@ even though some hardware can distinguish between that many fingers.
@section tapping_default Tap-to-click default setting
Tapping is **disabled** by default on most devices, see [this
commit](http://cgit.freedesktop.org/wayland/libinput/commit/?id=2219c12c3aa45b80f235e761e87c17fb9ec70eae)
commit](https://gitlab.freedesktop.org/libinput/libinput/commit/2219c12c3aa45b80f235e761e87c17fb9ec70eae)
because:
- if you don't know that tapping is a thing (or enabled by default), you get
spurious button events that make the desktop feel buggy.
......
......@@ -202,6 +202,35 @@ have captured the bug.
More arguments are available, see the **libinput-record(1)** and
**libinput-replay(1)** man pages.
@subsection libinput-record-autorestart libinput record's autorestart feature
`libinput record` often collects thousands of events per minute. However,
the output of `libinput record` usually needs to be visually inspected
or replayed in realtime on a developer machine. It is thus imperative that
the event log is kept as short as possible.
For bugs that are difficult to reproduce use
`libinput record --autorestart=2 --output-file=recording.yml`.
All events will be recorded to a file named
`recording.yml.<current-date-and-time>` and whenever the device does not
send events for 2 seconds, a new file is created. This helps to keep
individual recordings short.
To use the `--autorestart` option correctly:
- run `libinput record --autorestart=2 --output-file=<somefilename>.yml`.
You may provide a timeout other than 2 if needed.
- use the device to reproduce the bug, pausing frequently for 2s and longer
to rotate the logs
- when the bug triggers, **immediately stop using the device** and wait
several seconds for the log to rotate
- Ctrl+C the `libinput record` process without using the device
again. Attach the **last recording** to the bug report.
If you have to use the recorded device to stop `libinput record` (e.g. to
switch windows), remember that this will cause a new recording to be
created. Thus, attach the **second-to-last recording** to the bug report
because this one contains the bug trigger.
@subsection libinput-record-multiple Recording multiple devices at once
In some cases, an interaction between multiple devices is the cause for a
......@@ -226,7 +255,7 @@ Replaying events is the same as for a single recording:
$ sudo libinput replay touchpad-bug.log
@endverbatim
@subsection libinput-measure Measuring device properties with libinput measure
@section libinput-measure Measuring device properties with libinput measure
The `libinput measure` tool is a multiplexer for various sub-tools that can
measure specific properties on the device. These tools generally measure one
......
project('libinput', 'c', 'cpp',
version : '1.11.0',
version : '1.11.3',
license : 'MIT/Expat',
default_options : [ 'c_std=gnu99', 'warning_level=2' ],
meson_version : '>= 0.40.0')
......
......@@ -1012,6 +1012,9 @@ fallback_interface_remove(struct evdev_dispatch *evdev_dispatch)
struct fallback_dispatch *dispatch = fallback_dispatch(evdev_dispatch);
struct evdev_paired_keyboard *kbd, *tmp;
libinput_timer_cancel(&dispatch->debounce.timer);
libinput_timer_cancel(&dispatch->debounce.timer_short);
libinput_device_remove_event_listener(&dispatch->tablet_mode.other.listener);
list_for_each_safe(kbd,
......@@ -1081,10 +1084,9 @@ fallback_interface_destroy(struct evdev_dispatch *evdev_dispatch)
{
struct fallback_dispatch *dispatch = fallback_dispatch(evdev_dispatch);
libinput_timer_cancel(&dispatch->debounce.timer);
libinput_timer_destroy(&dispatch->debounce.timer);
libinput_timer_cancel(&dispatch->debounce.timer_short);
libinput_timer_destroy(&dispatch->debounce.timer_short);
free(dispatch->mt.slots);
free(dispatch);
}
......
......@@ -846,9 +846,6 @@ tp_palm_detect_tool_triggered(struct tp_dispatch *tp,
!t->is_tool_palm)
t->palm.state = PALM_NONE;
if (t->palm.state == PALM_TOOL_PALM)
tp_stop_actions(tp, time);
return t->palm.state == PALM_TOOL_PALM;
}
......@@ -1522,6 +1519,11 @@ tp_pre_process_state(struct tp_dispatch *tp, uint64_t time)
tp_for_each_touch(tp, t) {
if (t->state == TOUCH_MAYBE_END)
tp_end_touch(tp, t, time);
/* Ignore motion when pressure/touch size fell below the
* threshold, thus ending the touch */
if (t->state == TOUCH_END && t->history.count > 0)
t->point = tp_motion_history_offset(t, 0)->point;
}
}
......@@ -1784,6 +1786,8 @@ tp_interface_remove(struct evdev_dispatch *dispatch)
{
struct tp_dispatch *tp = tp_dispatch(dispatch);
libinput_timer_cancel(&tp->arbitration.arbitration_timer);
tp_remove_tap(tp);
tp_remove_buttons(tp);
tp_remove_sendevents(tp);
......@@ -1796,7 +1800,6 @@ tp_interface_destroy(struct evdev_dispatch *dispatch)
{
struct tp_dispatch *tp = tp_dispatch(dispatch);
libinput_timer_cancel(&tp->arbitration.arbitration_timer);
libinput_timer_destroy(&tp->arbitration.arbitration_timer);
libinput_timer_destroy(&tp->palm.trackpoint_timer);
libinput_timer_destroy(&tp->dwt.keyboard_timer);
......@@ -2253,6 +2256,9 @@ tp_pair_lid_switch(struct evdev_device *touchpad,
if ((lid_switch->tags & EVDEV_TAG_LID_SWITCH) == 0)
return;
if (touchpad->tags & EVDEV_TAG_EXTERNAL_TOUCHPAD)
return;
if (tp->lid_switch.lid_switch == NULL) {
evdev_log_debug(touchpad,
"lid_switch: activated for %s<->%s\n",
......@@ -2278,6 +2284,9 @@ tp_pair_tablet_mode_switch(struct evdev_device *touchpad,
if (tp->tablet_mode_switch.tablet_mode_switch)
return;
if (touchpad->tags & EVDEV_TAG_EXTERNAL_TOUCHPAD)
return;
evdev_log_debug(touchpad,
"tablet_mode_switch: activated for %s<->%s\n",
touchpad->devname,
......
......@@ -299,10 +299,17 @@ create_pointer_accelerator_filter_trackpoint(int max_hw_delta)
return NULL;
filter->history_size = ARRAY_LENGTH(filter->history);
filter->scale_factor = 1.0 * TRACKPOINT_DEFAULT_RANGE / max_hw_delta;
filter->max_accel = TRACKPOINT_DEFAULT_MAX_ACCEL;
filter->max_delta = TRACKPOINT_DEFAULT_MAX_DELTA;
filter->scale_factor = 1.0 * TRACKPOINT_DEFAULT_RANGE / max_hw_delta;
/* Crop to a maximum 1.0 for the scale factor, otherwise we scale up
* events from low-res trackpoints when really we should just take
* those as-is.
*/
filter->scale_factor = min(1.0, filter->scale_factor);
filter->base.interface = &accelerator_interface_trackpoint;
return &filter->base;
......
......@@ -2533,6 +2533,58 @@ START_TEST(debounce_spurious_switch_to_otherbutton)
}
END_TEST
START_TEST(debounce_remove_device_button_up)
{
struct libinput *li;
struct litest_device *dev;
li = litest_create_context();
dev = litest_add_device(li, LITEST_MOUSE);
litest_drain_events(li);
litest_event(dev, EV_KEY, BTN_LEFT, 1);
litest_event(dev, EV_SYN, SYN_REPORT, 0);
litest_event(dev, EV_KEY, BTN_LEFT, 0);
litest_event(dev, EV_SYN, SYN_REPORT, 0);
libinput_dispatch(li);
/* delete the device while the timer is still active */
litest_delete_device(dev);
libinput_dispatch(li);
litest_timeout_debounce();
libinput_dispatch(li);
libinput_unref(li);
}
END_TEST
START_TEST(debounce_remove_device_button_down)
{
struct libinput *li;
struct litest_device *dev;
li = litest_create_context();
dev = litest_add_device(li, LITEST_MOUSE);
litest_drain_events(li);
litest_event(dev, EV_KEY, BTN_LEFT, 1);
litest_event(dev, EV_SYN, SYN_REPORT, 0);
libinput_dispatch(li);
/* delete the device the timer is still active */
litest_delete_device(dev);
libinput_dispatch(li);
litest_timeout_debounce();
libinput_dispatch(li);
libinput_unref(li);
}
END_TEST
TEST_COLLECTION(pointer)
{
struct range axis_range = {ABS_X, ABS_Y + 1};
......@@ -2607,4 +2659,6 @@ TEST_COLLECTION(pointer)
litest_add("pointer:debounce_otherbutton", debounce_spurious_dont_enable_on_otherbutton, LITEST_BUTTON, LITEST_TOUCHPAD|LITEST_NO_DEBOUNCE);
litest_add("pointer:debounce_otherbutton", debounce_spurious_cancel_debounce_otherbutton, LITEST_BUTTON, LITEST_TOUCHPAD|LITEST_NO_DEBOUNCE);
litest_add("pointer:debounce_otherbutton", debounce_spurious_switch_to_otherbutton, LITEST_BUTTON, LITEST_TOUCHPAD|LITEST_NO_DEBOUNCE);
litest_add_no_device("pointer:debounce", debounce_remove_device_button_down);
litest_add_no_device("pointer:debounce", debounce_remove_device_button_up);
}
......@@ -1541,6 +1541,48 @@ START_TEST(touchpad_palm_detect_tool_palm_on_off)
}
END_TEST
START_TEST(touchpad_palm_detect_tool_palm_tap_after)
{
struct litest_device *dev = litest_current_device();
struct libinput *li = dev->libinput;
if (!touchpad_has_tool_palm(dev))
return;
litest_enable_tap(dev->libinput_device);
litest_drain_events(li);
litest_push_event_frame(dev);
litest_event(dev, EV_ABS, ABS_MT_TOOL_TYPE, MT_TOOL_PALM);
litest_touch_down(dev, 0, 50, 50);
litest_pop_event_frame(dev);
libinput_dispatch(li);
litest_touch_move_to(dev, 0, 50, 50, 50, 80, 10, 0);
libinput_dispatch(li);
litest_assert_empty_queue(li);
litest_push_event_frame(dev);
litest_event(dev, EV_ABS, ABS_MT_TOOL_TYPE, MT_TOOL_FINGER);
litest_touch_up(dev, 0);
litest_pop_event_frame(dev);
libinput_dispatch(li);
litest_timeout_tap();
litest_assert_empty_queue(li);
litest_touch_down(dev, 0, 50, 50);
libinput_dispatch(li);
litest_touch_up(dev, 0);
libinput_dispatch(li);
litest_timeout_tap();
litest_assert_button_event(li, BTN_LEFT, LIBINPUT_BUTTON_STATE_PRESSED);
litest_assert_button_event(li, BTN_LEFT, LIBINPUT_BUTTON_STATE_RELEASED);
litest_assert_empty_queue(li);
}
END_TEST
START_TEST(touchpad_palm_detect_tool_palm_tap)
{
struct litest_device *dev = litest_current_device();
......@@ -6336,6 +6378,7 @@ TEST_COLLECTION(touchpad)
litest_add("touchpad:palm", touchpad_palm_detect_tool_palm, LITEST_TOUCHPAD, LITEST_SINGLE_TOUCH);
litest_add("touchpad:palm", touchpad_palm_detect_tool_palm_on_off, LITEST_TOUCHPAD, LITEST_SINGLE_TOUCH);
litest_add("touchpad:palm", touchpad_palm_detect_tool_palm_tap, LITEST_TOUCHPAD, LITEST_SINGLE_TOUCH);
litest_add("touchpad:palm", touchpad_palm_detect_tool_palm_tap_after, LITEST_TOUCHPAD, LITEST_SINGLE_TOUCH);
litest_add("touchpad:palm", touchpad_palm_detect_touch_size, LITEST_APPLE_CLICKPAD, LITEST_ANY);
litest_add("touchpad:palm", touchpad_palm_detect_pressure, LITEST_TOUCHPAD, LITEST_SINGLE_TOUCH);
......
......@@ -991,7 +991,7 @@ main(int argc, char **argv)
return 1;
}
li = tools_open_backend(backend, seat_or_device, verbose, grab);
li = tools_open_backend(backend, seat_or_device, verbose, &grab);
if (!li)
return 1;
......
......@@ -958,7 +958,7 @@ main(int argc, char **argv)
return 1;
}
li = tools_open_backend(backend, seat_or_device, verbose, grab);
li = tools_open_backend(backend, seat_or_device, verbose, &grab);
if (!li)
return 1;
......
......@@ -372,6 +372,7 @@ main(int argc, char **argv)
{
struct libinput *li;
struct libinput_event *ev;
bool grab = false;
/* This is kept for backwards-compatibility with the old
libinput-list-devices */
......@@ -388,7 +389,7 @@ main(int argc, char **argv)
}
}
li = tools_open_backend(BACKEND_UDEV, "seat0", false, false);
li = tools_open_backend(BACKEND_UDEV, "seat0", false, &grab);
if (!li)
return 1;
......
......@@ -138,7 +138,7 @@ class TouchSequence(object):
def _str_summary(self):
if not self.points:
return "Sequence: no major/minor values recorded"
return "{:78s}".format("Sequence: no major/minor values recorded")
s = "Sequence: major: [{:3d}..{:3d}] ".format(
self.major_range.min, self.major_range.max
......
......@@ -105,6 +105,9 @@ class TouchSequence(object):
return self._str_state() if self.is_active else self._str_summary()
def _str_summary(self):
if not self.points:
return "{:78s}".format("Sequence: no pressure values recorded")
s = "Sequence {} pressure: "\
"min: {:3d} max: {:3d} avg: {:3d} median: {:3d} tags:" \
.format(
......
......@@ -89,6 +89,10 @@ def create(device):
data = 20
d.enable(libevdev.evbit(evtype, code), data=data)
properties = fetch(evdev, 'properties')
for prop in properties:
d.enable(libevdev.propbit(prop))
uinput = d.create_uinput_device()
return uinput
......
......@@ -57,6 +57,12 @@ usage(void)
"\n"
" measure <feature>\n"
" Measure various device properties. See the man page for more info\n"
"\n"
" record\n"
" Record event stream from a device node. See the man page for more info\n"
"\n"
" replay\n"
" Replay a previously recorded event stream. See the man page for more info\n"
"\n");
}
......
......@@ -232,7 +232,7 @@ open_restricted(const char *path, int flags, void *user_data)
if (fd < 0)
fprintf(stderr, "Failed to open %s (%s)\n",
path, strerror(errno));
else if (*grab && ioctl(fd, EVIOCGRAB, (void*)1) == -1)
else if (grab && *grab && ioctl(fd, EVIOCGRAB, (void*)1) == -1)
fprintf(stderr, "Grab requested, but failed for %s (%s)\n",
path, strerror(errno));
......@@ -251,7 +251,7 @@ static const struct libinput_interface interface = {
};
static struct libinput *
tools_open_udev(const char *seat, bool verbose, bool grab)
tools_open_udev(const char *seat, bool verbose, bool *grab)
{
struct libinput *li;
struct udev *udev = udev_new();
......@@ -261,16 +261,15 @@ tools_open_udev(const char *seat, bool verbose, bool grab)
return NULL;
}
li = libinput_udev_create_context(&interface, &grab, udev);
li = libinput_udev_create_context(&interface, grab, udev);
if (!li) {
fprintf(stderr, "Failed to initialize context from udev\n");
goto out;
}
if (verbose) {
libinput_log_set_handler(li, log_handler);
libinput_log_set_handler(li, log_handler);
if (verbose)
libinput_log_set_priority(li, LIBINPUT_LOG_PRIORITY_DEBUG);
}
if (libinput_udev_assign_seat(li, seat)) {
fprintf(stderr, "Failed to set seat\n");
......@@ -285,12 +284,12 @@ out:
}
static struct libinput *
tools_open_device(const char *path, bool verbose, bool grab)
tools_open_device(const char *path, bool verbose, bool *grab)
{
struct libinput_device *device;
struct libinput *li;
li = libinput_path_create_context(&interface, &grab);
li = libinput_path_create_context(&interface, grab);
if (!li) {
fprintf(stderr, "Failed to initialize context from %s\n", path);
return NULL;
......@@ -315,7 +314,7 @@ struct libinput *
tools_open_backend(enum tools_backend which,
const char *seat_or_device,
bool verbose,
bool grab)
bool *grab)
{
struct libinput *li;
......
......@@ -104,7 +104,7 @@ int tools_parse_option(int option,
struct libinput* tools_open_backend(enum tools_backend which,
const char *seat_or_device,
bool verbose,
bool grab);
bool *grab);
void tools_device_apply_config(struct libinput_device *device,
struct tools_options *options);
int tools_exec_command(const char *prefix, int argc, char **argv);
......
......@@ -124,6 +124,10 @@ libinput:name:*CyPS/2 Cypress Trackpad:dmi:*svnDell*:*XPSL322X*
LIBINPUT_ATTR_PRESSURE_RANGE=30:20
LIBINPUT_ATTR_PALM_PRESSURE_THRESHOLD=254
libinput:name:*Synaptics s3203:dmi:*svnDellInc.:*pnXPS139333*
LIBINPUT_ATTR_PRESSURE_RANGE=15:10
LIBINPUT_ATTR_PALM_PRESSURE_THRESHOLD=150
##########################################
# Elantech
##########################################
......@@ -171,6 +175,10 @@ libinput:name:Cypress APA Trackpad ?cyapa?:dmi:*
# HP
##########################################
# HP Chromebook 14
libinput:name:*Cypress APA Trackpad *cyapa*:dmi:*svnHewlett-Packard*:pnFalco*
LIBINPUT_ATTR_PRESSURE_RANGE=12:8
# HP Compaq6910p
libinput:name:SynPS/2 Synaptics TouchPad:dmi:*svnHewlett-Packard:*pnHPCompaq6910p*
LIBINPUT_MODEL_HP6910_TOUCHPAD=1
......@@ -220,6 +228,11 @@ libinput:mouse:b0003v04B3p3109*
libinput:mouse:b0003v17EFp6049*
LIBINPUT_MODEL_LENOVO_SCROLLPOINT=1
# Lenovo Thinkpad X41 Tablet has lid buttons to be used in tablet mode
# (#103749)
libinput:name:AT Translated Set 2 keyboard:dmi:*svnIBM:*pvrThinkPadX41Tablet:*
LIBINPUT_MODEL_TABLET_MODE_NO_SUSPEND=1
##########################################
# LENOVO
##########################################
......@@ -271,17 +284,23 @@ libinput:name:*Synaptics*:dmi:*svnLENOVO:*:pvrThinkPad*:*
libinput:keyboard:input:b0003v17EFp6047*
LIBINPUT_ATTR_KEYBOARD_INTEGRATION=external
# Lenovo X270
libinput:name:*TPPS/2 IBM TrackPoint*:dmi:svnLENOVO:*:pvrThinkPadX270:*
LIBINPUT_ATTR_TRACKPOINT_RANGE=40
# Lenovo X280
libinput:name:*ALPS TrackPoint*:dmi:svnLENOVO:*:pvrThinkPadX280:*
LIBINPUT_ATTR_TRACKPOINT_RANGE=70
# Lenovo Thinkpad X1 Yoga disables the keyboard anyway but has the same device
# use a windows key on the screen and volume rocker on the side (#103749)
libinput:name:AT Translated Set 2 keyboard:dmi:*svnLENOVO:*pvrThinkPadX1Yoga1st:*
# Lenovo Thinkpad Yoga (not the consumer versions) disables the keyboard
# mechanically. We must not disable the keyboard because some keys are
# still accessible on the screen and volume rocker.
# Initially #103749 and extended by #106799 comment 7
libinput:name:AT Translated Set 2 keyboard:dmi:*svnLENOVO:*pvrThinkPad*Yoga*:*
LIBINPUT_MODEL_TABLET_MODE_NO_SUSPEND=1
# Lenovo Carbon X1 6th gen (RMI4 only, PS/2 is broken on this device)
libinput:name:Synaptics TM3288-010:dmi:*svnLenovo:*pvrThinkPadX1Carbon6th:*
libinput:name:Synaptics TM3288-011:dmi:*svnLenovo:*pvrThinkPadX1Carbon6th:*
LIBINPUT_MODEL_LENOVO_CARBON_X1_6TH=1
##########################################
......