From 6b2b5ad53aafdc9eebe4a61cd78265fffd5c9538 Mon Sep 17 00:00:00 2001 From: Rutherther Date: Fri, 19 Jul 2024 16:54:32 +0200 Subject: [PATCH] singletagset-ipc - Correctly identify vacant tags, - Add active_other state that says a given tag is active on another monitor --- dwl.c | 8 ++++++-- protocols/dwl-ipc-unstable-v2.xml | 1 + 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/dwl.c b/dwl.c index cf35b68..1bc376e 100644 --- a/dwl.c +++ b/dwl.c @@ -1485,6 +1485,7 @@ void dwl_ipc_output_printstatus_to(DwlIpcOutput *ipc_output) { Monitor *monitor = ipc_output->mon; + Monitor *m; Client *c, *focused; int tagmask, state, numclients, focused_client, tag; const char *title, *appid; @@ -1497,9 +1498,12 @@ dwl_ipc_output_printstatus_to(DwlIpcOutput *ipc_output) if ((tagmask & monitor->tagset[monitor->seltags]) != 0) state |= ZDWL_IPC_OUTPUT_V2_TAG_STATE_ACTIVE; + wl_list_for_each(m, &mons, link) { + if (m != monitor && m->wlr_output->enabled && (tagmask & (m->tagset[m->seltags])) != 0) + state |= ZDWL_IPC_OUTPUT_V2_TAG_STATE_ACTIVE_OTHER; + } + wl_list_for_each(c, &clients, link) { - if (c->mon != monitor) - continue; if (!(c->tags & tagmask)) continue; if (c == focused) diff --git a/protocols/dwl-ipc-unstable-v2.xml b/protocols/dwl-ipc-unstable-v2.xml index 0a6e7e5..2638ea9 100644 --- a/protocols/dwl-ipc-unstable-v2.xml +++ b/protocols/dwl-ipc-unstable-v2.xml @@ -75,6 +75,7 @@ I would probably just submit raphi's patchset but I don't think that would be po + -- 2.48.1