char *command = scalloc(message_size + 1);
strncpy(command, (const char*)message, message_size);
LOG("IPC: received: *%s*\n", command);
- parse_cmd((const char*)command);
+ const char *reply = parse_cmd((const char*)command);
tree_render();
free(command);
- /* For now, every command gets a positive acknowledge
- * (will change with the new command parser) */
- const char *reply = "{\"success\":true}";
+ /* If no reply was provided, we just use the default success message */
+ if (reply == NULL)
+ reply = "{\"success\":true}";
ipc_send_message(fd, (const unsigned char*)reply,
I3_IPC_REPLY_TYPE_COMMAND, strlen(reply));
}
ystr("layout");
y(integer, con->layout);
+ ystr("border");
+ y(integer, con->border_style);
+
ystr("rect");
y(map_open);
ystr("x");
if (inplace_restart) {
if (con->window != NULL) {
- ystr("swallows");
- y(array_open);
- y(map_open);
- ystr("id");
- y(integer, con->window->id);
- y(map_close);
- y(array_close);
+ ystr("swallows");
+ y(array_open);
+ y(map_open);
+ ystr("id");
+ y(integer, con->window->id);
+ y(map_close);
+ y(array_close);
}
}