From d9f893f882f1a80bb31e80ebe8433aa8a6a97cd1 Mon Sep 17 00:00:00 2001 From: project-repo Date: Tue, 31 Oct 2023 08:16:27 +0100 Subject: [PATCH] Print whether output is active in dump output --- keybinding.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/keybinding.c b/keybinding.c index 9429e03..3568e21 100644 --- a/keybinding.c +++ b/keybinding.c @@ -1018,7 +1018,7 @@ print_output(struct cg_output *outp) { struct dyn_str outp_str; outp_str.len = 0; outp_str.cur_pos = 0; - uint32_t nmemb = 9; + uint32_t nmemb = 10; outp_str.str_arr = calloc(nmemb, sizeof(char *)); print_str(&outp_str, "\"%s\": {\n", outp->name); print_str(&outp_str, "\"priority\": %d,\n", outp->priority); @@ -1030,6 +1030,8 @@ print_output(struct cg_output *outp) { (float)outp->wlr_output->refresh / 1000.0); print_str(&outp_str, "\"permanent\": %d,\n", outp->role == OUTPUT_ROLE_PERMANENT); + print_str(&outp_str, "\"active\": %d,\n", + !outp->destroyed); print_str(&outp_str, "\"curr_workspace\": %d,\n", outp->curr_workspace + 1); char *workspaces_str = print_workspaces(outp); if(workspaces_str != NULL) {