diff options
Diffstat (limited to 'sway/ipc-json.c')
-rw-r--r-- | sway/ipc-json.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/sway/ipc-json.c b/sway/ipc-json.c index 61602343..6e5ba4fd 100644 --- a/sway/ipc-json.c +++ b/sway/ipc-json.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include "sway/input/input-manager.h" | 13 | #include "sway/input/input-manager.h" |
14 | #include "sway/input/cursor.h" | 14 | #include "sway/input/cursor.h" |
15 | #include "sway/input/seat.h" | 15 | #include "sway/input/seat.h" |
16 | #include <wlr/backend/libinput.h> | ||
16 | #include <wlr/types/wlr_box.h> | 17 | #include <wlr/types/wlr_box.h> |
17 | #include <wlr/types/wlr_output.h> | 18 | #include <wlr/types/wlr_output.h> |
18 | #include <xkbcommon/xkbcommon.h> | 19 | #include <xkbcommon/xkbcommon.h> |
@@ -600,6 +601,26 @@ json_object *ipc_json_describe_input(struct sway_input_device *device) { | |||
600 | } | 601 | } |
601 | } | 602 | } |
602 | 603 | ||
604 | if (wlr_input_device_is_libinput(device->wlr_device)) { | ||
605 | struct libinput_device *libinput_dev; | ||
606 | libinput_dev = wlr_libinput_get_device_handle(device->wlr_device); | ||
607 | |||
608 | const char *events = "unknown"; | ||
609 | switch (libinput_device_config_send_events_get_mode(libinput_dev)) { | ||
610 | case LIBINPUT_CONFIG_SEND_EVENTS_ENABLED: | ||
611 | events = "enabled"; | ||
612 | break; | ||
613 | case LIBINPUT_CONFIG_SEND_EVENTS_DISABLED_ON_EXTERNAL_MOUSE: | ||
614 | events = "disabled_on_external_mouse"; | ||
615 | break; | ||
616 | case LIBINPUT_CONFIG_SEND_EVENTS_DISABLED: | ||
617 | events = "disabled"; | ||
618 | break; | ||
619 | } | ||
620 | json_object_object_add(object, "libinput_send_events", | ||
621 | json_object_new_string(events)); | ||
622 | } | ||
623 | |||
603 | return object; | 624 | return object; |
604 | } | 625 | } |
605 | 626 | ||
@@ -687,6 +708,10 @@ json_object *ipc_json_describe_bar_config(struct bar_config *bar) { | |||
687 | } | 708 | } |
688 | json_object_object_add(json, "bar_height", | 709 | json_object_object_add(json, "bar_height", |
689 | json_object_new_int(bar->height)); | 710 | json_object_new_int(bar->height)); |
711 | json_object_object_add(json, "status_padding", | ||
712 | json_object_new_int(bar->status_padding)); | ||
713 | json_object_object_add(json, "status_edge_padding", | ||
714 | json_object_new_int(bar->status_edge_padding)); | ||
690 | json_object_object_add(json, "wrap_scroll", | 715 | json_object_object_add(json, "wrap_scroll", |
691 | json_object_new_boolean(bar->wrap_scroll)); | 716 | json_object_new_boolean(bar->wrap_scroll)); |
692 | json_object_object_add(json, "workspace_buttons", | 717 | json_object_object_add(json, "workspace_buttons", |