diff options
author | pudiva chip lĂquida <pudiva@skylittlesystem.org> | 2022-08-24 00:13:12 +0100 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2022-10-30 10:56:34 +0100 |
commit | 7cc8ab6d6c4e7ebbfee832b3d8d8fd86623d89fc (patch) | |
tree | faacab010de2a3ffdd76dcf3bab015bb708f42dc /sway/ipc-json.c | |
parent | container_floating_set_default_size: Store workspace size box on the stack (diff) | |
download | sway-7cc8ab6d6c4e7ebbfee832b3d8d8fd86623d89fc.tar.gz sway-7cc8ab6d6c4e7ebbfee832b3d8d8fd86623d89fc.tar.zst sway-7cc8ab6d6c4e7ebbfee832b3d8d8fd86623d89fc.zip |
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
Diffstat (limited to 'sway/ipc-json.c')
-rw-r--r-- | sway/ipc-json.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/sway/ipc-json.c b/sway/ipc-json.c index 61613f53..d757f21f 100644 --- a/sway/ipc-json.c +++ b/sway/ipc-json.c | |||
@@ -1000,6 +1000,19 @@ static json_object *describe_libinput_device(struct libinput_device *device) { | |||
1000 | json_object_object_add(object, "dwt", json_object_new_string(dwt)); | 1000 | json_object_object_add(object, "dwt", json_object_new_string(dwt)); |
1001 | } | 1001 | } |
1002 | 1002 | ||
1003 | if (libinput_device_config_dwtp_is_available(device)) { | ||
1004 | const char *dwtp = "unknown"; | ||
1005 | switch (libinput_device_config_dwtp_get_enabled(device)) { | ||
1006 | case LIBINPUT_CONFIG_DWTP_ENABLED: | ||
1007 | dwtp = "enabled"; | ||
1008 | break; | ||
1009 | case LIBINPUT_CONFIG_DWTP_DISABLED: | ||
1010 | dwtp = "disabled"; | ||
1011 | break; | ||
1012 | } | ||
1013 | json_object_object_add(object, "dwtp", json_object_new_string(dwtp)); | ||
1014 | } | ||
1015 | |||
1003 | if (libinput_device_config_calibration_has_matrix(device)) { | 1016 | if (libinput_device_config_calibration_has_matrix(device)) { |
1004 | float matrix[6]; | 1017 | float matrix[6]; |
1005 | libinput_device_config_calibration_get_matrix(device, matrix); | 1018 | libinput_device_config_calibration_get_matrix(device, matrix); |