aboutsummaryrefslogtreecommitdiffstats
path: root/sway/ipc-server.c
diff options
context:
space:
mode:
authorLibravatar Drew DeVault <sir@cmpwn.com>2018-03-29 17:20:03 -0400
committerLibravatar Drew DeVault <sir@cmpwn.com>2018-03-29 22:11:08 -0400
commitbf7a4cd0ebd465a0597e9eec0142fad222b396de (patch)
treef95c4b8cd8e7d06eaa1b688d3bcbb3249dc21129 /sway/ipc-server.c
parentImplement enough IPC for swaybar to work (diff)
downloadsway-bf7a4cd0ebd465a0597e9eec0142fad222b396de.tar.gz
sway-bf7a4cd0ebd465a0597e9eec0142fad222b396de.tar.zst
sway-bf7a4cd0ebd465a0597e9eec0142fad222b396de.zip
Add bar configuration commands
Diffstat (limited to 'sway/ipc-server.c')
-rw-r--r--sway/ipc-server.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/sway/ipc-server.c b/sway/ipc-server.c
index 408ed432..59fc05f9 100644
--- a/sway/ipc-server.c
+++ b/sway/ipc-server.c
@@ -313,10 +313,18 @@ void ipc_event_window(swayc_t *window, const char *change) {
313 313
314 const char *json_string = json_object_to_json_string(obj); 314 const char *json_string = json_object_to_json_string(obj);
315 ipc_send_event(json_string, IPC_EVENT_WINDOW); 315 ipc_send_event(json_string, IPC_EVENT_WINDOW);
316
317 json_object_put(obj); // free 316 json_object_put(obj); // free
318} 317}
319 318
319void ipc_event_barconfig_update(struct bar_config *bar) {
320 wlr_log(L_DEBUG, "Sending barconfig_update event");
321 json_object *json = ipc_json_describe_bar_config(bar);
322
323 const char *json_string = json_object_to_json_string(json);
324 ipc_send_event(json_string, IPC_EVENT_BARCONFIG_UPDATE);
325 json_object_put(json); // free
326}
327
320int ipc_client_handle_writable(int client_fd, uint32_t mask, void *data) { 328int ipc_client_handle_writable(int client_fd, uint32_t mask, void *data) {
321 struct ipc_client *client = data; 329 struct ipc_client *client = data;
322 330