From 7f700e08ac8ac95c395b54c86b40d2fc79242310 Mon Sep 17 00:00:00 2001 From: Brian Ashworth Date: Thu, 7 Mar 2019 03:37:49 -0500 Subject: ipc: describe libinput device configuration This adds the device configurations to the ipc response for libinput devices. Only supported configuration options for the device will be added. This also moves `libinput_send_events` inside a new `libinput` object that contains the rest of the configuration options. sway-ipc(7) has been updated to reflect the changes and document the new additions. --- swaymsg/main.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'swaymsg') diff --git a/swaymsg/main.c b/swaymsg/main.c index 716d2d2e..e51c00d9 100644 --- a/swaymsg/main.c +++ b/swaymsg/main.c @@ -113,7 +113,7 @@ static const char *pretty_type_name(const char *name) { } static void pretty_print_input(json_object *i) { - json_object *id, *name, *type, *product, *vendor, *kbdlayout, *events; + json_object *id, *name, *type, *product, *vendor, *kbdlayout, *libinput; json_object_object_get_ex(i, "identifier", &id); json_object_object_get_ex(i, "name", &name); json_object_object_get_ex(i, "type", &type); @@ -139,8 +139,12 @@ static void pretty_print_input(json_object *i) { printf(" Active Keyboard Layout: %s\n", layout ? layout : "(unnamed)"); } - if (json_object_object_get_ex(i, "libinput_send_events", &events)) { - printf(" Libinput Send Events: %s\n", json_object_get_string(events)); + if (json_object_object_get_ex(i, "libinput", &libinput)) { + json_object *events; + if (json_object_object_get_ex(libinput, "send_events", &events)) { + printf(" Libinput Send Events: %s\n", + json_object_get_string(events)); + } } printf("\n"); -- cgit v1.2.3