mirror of
https://github.com/swaywm/sway.git
synced 2025-11-02 09:01:40 -05:00
Support libinput's 1.21 new dwtp option
Support the new dwtp (disable while trackpointing) option introduced in libinput 1.21, allowing users to control whether the trackpoint (like those in Thinkpads, but not only) should be disabled while using the keyboard/touchpad. See: https://gitlab.freedesktop.org/libinput/libinput/-/issues/731
This commit is contained in:
parent
a61815d385
commit
7cc8ab6d6c
11 changed files with 74 additions and 3 deletions
|
|
@ -1000,6 +1000,19 @@ static json_object *describe_libinput_device(struct libinput_device *device) {
|
|||
json_object_object_add(object, "dwt", json_object_new_string(dwt));
|
||||
}
|
||||
|
||||
if (libinput_device_config_dwtp_is_available(device)) {
|
||||
const char *dwtp = "unknown";
|
||||
switch (libinput_device_config_dwtp_get_enabled(device)) {
|
||||
case LIBINPUT_CONFIG_DWTP_ENABLED:
|
||||
dwtp = "enabled";
|
||||
break;
|
||||
case LIBINPUT_CONFIG_DWTP_DISABLED:
|
||||
dwtp = "disabled";
|
||||
break;
|
||||
}
|
||||
json_object_object_add(object, "dwtp", json_object_new_string(dwtp));
|
||||
}
|
||||
|
||||
if (libinput_device_config_calibration_has_matrix(device)) {
|
||||
float matrix[6];
|
||||
libinput_device_config_calibration_get_matrix(device, matrix);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue