diff options
author | Tony Crisci <tony@dubstepdish.com> | 2016-08-04 21:48:20 -0400 |
---|---|---|
committer | Tony Crisci <tony@dubstepdish.com> | 2016-08-04 21:48:20 -0400 |
commit | 4ab35df1573b2c950daa3b24205679d4eb2864b9 (patch) | |
tree | 25601bcca0c2857b324cd11cb913c090a9ea1601 /sway/ipc-server.c | |
parent | 91709bd12a88f668ce9a160e5dbecbbd77cef4bb (diff) |
ipc: log sending of events
Log the sending of the events in the debug log. This makes ipc server events
easier to verify.
Diffstat (limited to 'sway/ipc-server.c')
-rw-r--r-- | sway/ipc-server.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sway/ipc-server.c b/sway/ipc-server.c index c189bc0f..7039e348 100644 --- a/sway/ipc-server.c +++ b/sway/ipc-server.c @@ -539,6 +539,7 @@ void ipc_send_event(const char *json_string, enum ipc_command_type event) { } void ipc_event_workspace(swayc_t *old, swayc_t *new, const char *change) { + sway_log(L_DEBUG, "Sending workspace::%s event", change); json_object *obj = json_object_new_object(); json_object_object_add(obj, "change", json_object_new_string(change)); if (strcmp("focus", change) == 0) { @@ -562,6 +563,7 @@ void ipc_event_workspace(swayc_t *old, swayc_t *new, const char *change) { } void ipc_event_window(swayc_t *window, const char *change) { + sway_log(L_DEBUG, "Sending window::%s event", change); json_object *obj = json_object_new_object(); json_object_object_add(obj, "change", json_object_new_string(change)); if (strcmp(change, "close") == 0 || !window) { @@ -577,6 +579,7 @@ void ipc_event_window(swayc_t *window, const char *change) { } void ipc_event_barconfig_update(struct bar_config *bar) { + sway_log(L_DEBUG, "Sending barconfig_update event"); json_object *json = ipc_json_describe_bar_config(bar); const char *json_string = json_object_to_json_string(json); ipc_send_event(json_string, IPC_EVENT_BARCONFIG_UPDATE); @@ -585,6 +588,7 @@ void ipc_event_barconfig_update(struct bar_config *bar) { } void ipc_event_mode(const char *mode) { + sway_log(L_DEBUG, "Sending mode::%s event", mode); json_object *obj = json_object_new_object(); json_object_object_add(obj, "change", json_object_new_string(mode)); @@ -595,6 +599,7 @@ void ipc_event_mode(const char *mode) { } void ipc_event_modifier(uint32_t modifier, const char *state) { + sway_log(L_DEBUG, "Sending modifier::%s event", state); json_object *obj = json_object_new_object(); json_object_object_add(obj, "change", json_object_new_string(state)); @@ -609,6 +614,7 @@ void ipc_event_modifier(uint32_t modifier, const char *state) { #if SWAY_BINDING_EVENT static void ipc_event_binding(json_object *sb_obj) { + sway_log(L_DEBUG, "Sending binding::run event"); json_object *obj = json_object_new_object(); json_object_object_add(obj, "change", json_object_new_string("run")); json_object_object_add(obj, "binding", sb_obj); |