From c28e881413cbcd4d59596087d350767efad6c8f1 Mon Sep 17 00:00:00 2001 From: Rutherther Date: Thu, 2 May 2024 22:33:09 +0200 Subject: [PATCH] Make IPC play well with singletagset, add active_other tag state --- 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 129ef6a..3537a6d 100644 --- a/dwl.c +++ b/dwl.c @@ -1327,6 +1327,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; @@ -1339,9 +1340,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