X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=src%2Fipc.c;h=759665fe91b76341e74128807ce830c39e0ef63e;hb=50edf495aa3971bfb67471c3aaf2eb72e7abd443;hp=274f60106bd2eb67fb4562a40f62aa053b405291;hpb=8cad1c1fa622db78ed47d5377045671816686e79;p=i3%2Fi3 diff --git a/src/ipc.c b/src/ipc.c index 274f6010..759665fe 100644 --- a/src/ipc.c +++ b/src/ipc.c @@ -113,7 +113,7 @@ void ipc_shutdown(shutdown_reason_t reason) { * or not (at the moment, always returns true). * */ -IPC_HANDLER(command) { +IPC_HANDLER(run_command) { /* To get a properly terminated buffer, we copy * message_size bytes out of the buffer */ char *command = scalloc(message_size + 1, 1); @@ -580,6 +580,10 @@ static void dump_bar_bindings(yajl_gen gen, Barconfig *config) { } static char *canonicalize_output_name(char *name) { + /* Do not canonicalize special output names. */ + if (strcasecmp(name, "primary") == 0) { + return name; + } Output *output = get_output_by_name(name, false); return output ? output_primary_name(output) : name; } @@ -1121,7 +1125,7 @@ IPC_HANDLER(get_config) { /* The index of each callback function corresponds to the numeric * value of the message type (see include/i3/ipc.h) */ handler_t handlers[10] = { - handle_command, + handle_run_command, handle_get_workspaces, handle_subscribe, handle_get_outputs,