aboutsummaryrefslogtreecommitdiffstats
path: root/swaymsg
diff options
context:
space:
mode:
authorLibravatar Brian Ashworth <bosrsf04@gmail.com>2019-03-07 03:37:49 -0500
committerLibravatar Drew DeVault <sir@cmpwn.com>2019-03-07 08:41:19 -0700
commit7f700e08ac8ac95c395b54c86b40d2fc79242310 (patch)
tree674c6316dff0b1c4f297b7a53f413b669aa271ed /swaymsg
parentipc: fix fullscreen deco_rect (diff)
downloadsway-7f700e08ac8ac95c395b54c86b40d2fc79242310.tar.gz
sway-7f700e08ac8ac95c395b54c86b40d2fc79242310.tar.zst
sway-7f700e08ac8ac95c395b54c86b40d2fc79242310.zip
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.
Diffstat (limited to 'swaymsg')
-rw-r--r--swaymsg/main.c10
1 files changed, 7 insertions, 3 deletions
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) {
113} 113}
114 114
115static void pretty_print_input(json_object *i) { 115static void pretty_print_input(json_object *i) {
116 json_object *id, *name, *type, *product, *vendor, *kbdlayout, *events; 116 json_object *id, *name, *type, *product, *vendor, *kbdlayout, *libinput;
117 json_object_object_get_ex(i, "identifier", &id); 117 json_object_object_get_ex(i, "identifier", &id);
118 json_object_object_get_ex(i, "name", &name); 118 json_object_object_get_ex(i, "name", &name);
119 json_object_object_get_ex(i, "type", &type); 119 json_object_object_get_ex(i, "type", &type);
@@ -139,8 +139,12 @@ static void pretty_print_input(json_object *i) {
139 printf(" Active Keyboard Layout: %s\n", layout ? layout : "(unnamed)"); 139 printf(" Active Keyboard Layout: %s\n", layout ? layout : "(unnamed)");
140 } 140 }
141 141
142 if (json_object_object_get_ex(i, "libinput_send_events", &events)) { 142 if (json_object_object_get_ex(i, "libinput", &libinput)) {
143 printf(" Libinput Send Events: %s\n", json_object_get_string(events)); 143 json_object *events;
144 if (json_object_object_get_ex(libinput, "send_events", &events)) {
145 printf(" Libinput Send Events: %s\n",
146 json_object_get_string(events));
147 }
144 } 148 }
145 149
146 printf("\n"); 150 printf("\n");