aboutsummaryrefslogtreecommitdiffstats
path: root/sway/ipc-server.c
diff options
context:
space:
mode:
authorLibravatar Brian Ashworth <bosrsf04@gmail.com>2018-06-05 17:56:32 -0400
committerLibravatar Brian Ashworth <bosrsf04@gmail.com>2018-06-06 20:11:24 -0400
commita1b5b93d299bfe129f2b3409a7f642049fcce1d6 (patch)
tree4d87f5ab8f0f18ada1fc12a4eb4ba3b5d0350527 /sway/ipc-server.c
parentMerge pull request #2116 from RedSoxFan/fix-2113 (diff)
downloadsway-a1b5b93d299bfe129f2b3409a7f642049fcce1d6.tar.gz
sway-a1b5b93d299bfe129f2b3409a7f642049fcce1d6.tar.zst
sway-a1b5b93d299bfe129f2b3409a7f642049fcce1d6.zip
Store sway_outputs so that they can be reenabled
Diffstat (limited to 'sway/ipc-server.c')
-rw-r--r--sway/ipc-server.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/sway/ipc-server.c b/sway/ipc-server.c
index 8d9ab06a..2a2346b4 100644
--- a/sway/ipc-server.c
+++ b/sway/ipc-server.c
@@ -19,6 +19,7 @@
19#include "sway/commands.h" 19#include "sway/commands.h"
20#include "sway/ipc-json.h" 20#include "sway/ipc-json.h"
21#include "sway/ipc-server.h" 21#include "sway/ipc-server.h"
22#include "sway/output.h"
22#include "sway/server.h" 23#include "sway/server.h"
23#include "sway/input/input-manager.h" 24#include "sway/input/input-manager.h"
24#include "sway/input/seat.h" 25#include "sway/input/seat.h"
@@ -488,6 +489,14 @@ void ipc_client_handle_command(struct ipc_client *client) {
488 ipc_json_describe_container(container)); 489 ipc_json_describe_container(container));
489 } 490 }
490 } 491 }
492 for (int i = 0; i < root_container.sway_root->outputs->length; ++i) {
493 struct sway_output *output =
494 root_container.sway_root->outputs->items[i];
495 if (!output->swayc) {
496 json_object_array_add(outputs,
497 ipc_json_describe_disabled_output(output));
498 }
499 }
491 const char *json_string = json_object_to_json_string(outputs); 500 const char *json_string = json_object_to_json_string(outputs);
492 ipc_send_reply(client, json_string, (uint32_t) strlen(json_string)); 501 ipc_send_reply(client, json_string, (uint32_t) strlen(json_string));
493 json_object_put(outputs); // free 502 json_object_put(outputs); // free