mirror of
https://github.com/swaywm/sway.git
synced 2025-11-05 13:29:51 -05:00
input/libinput: add scroll_button_lock method
Closes https://github.com/swaywm/sway/issues/6987 Co-authored-by: JJGadgets <git@jjgadgets.tech> Co-authored-by: DeltaWhy <mike5713@gmail.com>
This commit is contained in:
parent
8b4b65d665
commit
c08762901e
10 changed files with 66 additions and 0 deletions
|
|
@ -1019,6 +1019,17 @@ static json_object *describe_libinput_device(struct libinput_device *device) {
|
|||
uint32_t button = libinput_device_config_scroll_get_button(device);
|
||||
json_object_object_add(object, "scroll_button",
|
||||
json_object_new_int(button));
|
||||
const char *lock = "unknown";
|
||||
switch (libinput_device_config_scroll_get_button_lock(device)) {
|
||||
case LIBINPUT_CONFIG_SCROLL_BUTTON_LOCK_ENABLED:
|
||||
lock = "enabled";
|
||||
break;
|
||||
case LIBINPUT_CONFIG_SCROLL_BUTTON_LOCK_DISABLED:
|
||||
lock = "disabled";
|
||||
break;
|
||||
}
|
||||
json_object_object_add(object, "scroll_button_lock",
|
||||
json_object_new_string(lock));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue