diff options
author | emersion <contact@emersion.fr> | 2018-06-07 19:26:55 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-07 19:26:55 +0100 |
commit | 2e289831ee3198f36e2c02bd4542fa4f6646a81b (patch) | |
tree | 7de104885aabb49f17739d7631ef6cd4f628e64a /sway/ipc-server.c | |
parent | 22c1c4beb4baa369f883fb5360c40158513c8e10 (diff) | |
parent | e072fbc6d98784e5610aa88251a15f64e30bbcae (diff) |
Merge pull request #2108 from RedSoxFan/store-outputs
Allow outputs to be re-enabled
Diffstat (limited to 'sway/ipc-server.c')
-rw-r--r-- | sway/ipc-server.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sway/ipc-server.c b/sway/ipc-server.c index 8d9ab06a..241fe742 100644 --- a/sway/ipc-server.c +++ b/sway/ipc-server.c @@ -19,6 +19,7 @@ #include "sway/commands.h" #include "sway/ipc-json.h" #include "sway/ipc-server.h" +#include "sway/output.h" #include "sway/server.h" #include "sway/input/input-manager.h" #include "sway/input/seat.h" @@ -488,6 +489,13 @@ void ipc_client_handle_command(struct ipc_client *client) { ipc_json_describe_container(container)); } } + struct sway_output *output; + wl_list_for_each(output, &root_container.sway_root->outputs, link) { + if (!output->swayc) { + json_object_array_add(outputs, + ipc_json_describe_disabled_output(output)); + } + } const char *json_string = json_object_to_json_string(outputs); ipc_send_reply(client, json_string, (uint32_t) strlen(json_string)); json_object_put(outputs); // free |