~ruther/dwl

c28e881413cbcd4d59596087d350767efad6c8f1 — Rutherther 11 months ago 9077c88 patch/singletagset-ipc
Make IPC play well with singletagset, add active_other tag state
2 files changed, 7 insertions(+), 2 deletions(-)

M dwl.c
M protocols/dwl-ipc-unstable-v2.xml
M dwl.c => dwl.c +6 -2
@@ 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)

M protocols/dwl-ipc-unstable-v2.xml => protocols/dwl-ipc-unstable-v2.xml +1 -0
@@ 75,6 75,7 @@ I would probably just submit raphi's patchset but I don't think that would be po
      <entry name="none" value="0" summary="no state"/>
      <entry name="active" value="1" summary="tag is active"/>
      <entry name="urgent" value="2" summary="tag has at least one urgent client"/>
      <entry name="active_other" value="4" summary="tag is active on another monitor"/>
    </enum>

    <request name="release" type="destructor">

Do not follow this link