aboutsummaryrefslogtreecommitdiff
path: root/sway/ipc-server.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/ipc-server.c')
-rw-r--r--sway/ipc-server.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sway/ipc-server.c b/sway/ipc-server.c
index 456db866..ff1bc89f 100644
--- a/sway/ipc-server.c
+++ b/sway/ipc-server.c
@@ -445,8 +445,12 @@ void ipc_event_binding(struct sway_binding *binding) {
json_object_object_add(json_binding, "input_code", json_object_new_int(input_code));
json_object_object_add(json_binding, "symbols", symbols);
json_object_object_add(json_binding, "symbol", symbol);
- json_object_object_add(json_binding, "input_type", binding->type == BINDING_MOUSE ?
- json_object_new_string("mouse") : json_object_new_string("keyboard"));
+
+ bool mouse = binding->type == BINDING_MOUSECODE ||
+ binding->type == BINDING_MOUSESYM;
+ json_object_object_add(json_binding, "input_type", mouse
+ ? json_object_new_string("mouse")
+ : json_object_new_string("keyboard"));
json_object *json = json_object_new_object();
json_object_object_add(json, "change", json_object_new_string("run"));