aboutsummaryrefslogtreecommitdiffstats
path: root/sway/ipc-json.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/ipc-json.c')
-rw-r--r--sway/ipc-json.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/sway/ipc-json.c b/sway/ipc-json.c
index c7cbea01..58356d4e 100644
--- a/sway/ipc-json.c
+++ b/sway/ipc-json.c
@@ -1019,6 +1019,17 @@ static json_object *describe_libinput_device(struct libinput_device *device) {
1019 uint32_t button = libinput_device_config_scroll_get_button(device); 1019 uint32_t button = libinput_device_config_scroll_get_button(device);
1020 json_object_object_add(object, "scroll_button", 1020 json_object_object_add(object, "scroll_button",
1021 json_object_new_int(button)); 1021 json_object_new_int(button));
1022 const char *lock = "unknown";
1023 switch (libinput_device_config_scroll_get_button_lock(device)) {
1024 case LIBINPUT_CONFIG_SCROLL_BUTTON_LOCK_ENABLED:
1025 lock = "enabled";
1026 break;
1027 case LIBINPUT_CONFIG_SCROLL_BUTTON_LOCK_DISABLED:
1028 lock = "disabled";
1029 break;
1030 }
1031 json_object_object_add(object, "scroll_button_lock",
1032 json_object_new_string(lock));
1022 } 1033 }
1023 } 1034 }
1024 1035