mirror of
https://github.com/swaywm/sway.git
synced 2025-11-06 13:29:50 -05:00
Store sway_outputs so that they can be reenabled
This commit is contained in:
parent
22c1c4beb4
commit
a1b5b93d29
11 changed files with 118 additions and 33 deletions
|
|
@ -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,14 @@ void ipc_client_handle_command(struct ipc_client *client) {
|
|||
ipc_json_describe_container(container));
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < root_container.sway_root->outputs->length; ++i) {
|
||||
struct sway_output *output =
|
||||
root_container.sway_root->outputs->items[i];
|
||||
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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue