diff options
| author | Drew DeVault <[email protected]> | 2018-03-29 17:20:03 -0400 | 
|---|---|---|
| committer | Drew DeVault <[email protected]> | 2018-03-29 22:11:08 -0400 | 
| commit | bf7a4cd0ebd465a0597e9eec0142fad222b396de (patch) | |
| tree | f95c4b8cd8e7d06eaa1b688d3bcbb3249dc21129 /sway/ipc-server.c | |
| parent | 6836074fed83255438960fdc9597532d8bcae4bd (diff) | |
Add bar configuration commands
Diffstat (limited to 'sway/ipc-server.c')
| -rw-r--r-- | sway/ipc-server.c | 10 | 
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) {  	const char *json_string = json_object_to_json_string(obj);  	ipc_send_event(json_string, IPC_EVENT_WINDOW); -  	json_object_put(obj); // free  } +void ipc_event_barconfig_update(struct bar_config *bar) { +	wlr_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); +	json_object_put(json); // free +} +  int ipc_client_handle_writable(int client_fd, uint32_t mask, void *data) {  	struct ipc_client *client = data; | 
