diff --git a/maomao.c b/maomao.c index 654b967..10f3e6a 100644 --- a/maomao.c +++ b/maomao.c @@ -2846,56 +2846,56 @@ void dwl_ipc_output_printstatus_to(DwlIpcOutput *ipc_output) { focused = focustop(monitor); zdwl_ipc_output_v2_send_active(ipc_output->resource, monitor == selmon); - if ((monitor->tagset[monitor->seltags] & TAGMASK) == TAGMASK) { - state = 0; - state |= ZDWL_IPC_OUTPUT_V2_TAG_STATE_ACTIVE; - zdwl_ipc_output_v2_send_tag(ipc_output->resource, 888, state, 1, 1); - } else { - for (tag = 0; tag < LENGTH(tags); tag++) { - numclients = state = focused_client = 0; - tagmask = 1 << tag; - if ((tagmask & monitor->tagset[monitor->seltags]) != 0) - state |= ZDWL_IPC_OUTPUT_V2_TAG_STATE_ACTIVE; - - wl_list_for_each(c, &clients, link) { - if (c->iskilling) - continue; - if (c->mon != monitor) - continue; - if (!(c->tags & tagmask)) - continue; - if (c == focused) - focused_client = 1; - if (c->isurgent) - state |= ZDWL_IPC_OUTPUT_V2_TAG_STATE_URGENT; - - numclients++; - } - zdwl_ipc_output_v2_send_tag(ipc_output->resource, tag, state, numclients, - focused_client); - } - } - - // for ( tag = 0 ; tag < LENGTH(tags); tag++) { + // if ((monitor->tagset[monitor->seltags] & TAGMASK) == TAGMASK) { + // state = 0; + // state |= ZDWL_IPC_OUTPUT_V2_TAG_STATE_ACTIVE; + // zdwl_ipc_output_v2_send_tag(ipc_output->resource, 888, state, 1, 1); + // } else { + // for (tag = 0; tag < LENGTH(tags); tag++) { // numclients = state = focused_client = 0; // tagmask = 1 << tag; // if ((tagmask & monitor->tagset[monitor->seltags]) != 0) - // state |= ZDWL_IPC_OUTPUT_V2_TAG_STATE_ACTIVE; + // state |= ZDWL_IPC_OUTPUT_V2_TAG_STATE_ACTIVE; + // wl_list_for_each(c, &clients, link) { - // if (c->mon != monitor) - // continue; - // if (!(c->tags & tagmask)) - // continue; - // if (c == focused) - // focused_client = 1; - // if (c->isurgent) - // state |= ZDWL_IPC_OUTPUT_V2_TAG_STATE_URGENT; - // numclients++; + // if (c->iskilling) + // continue; + // if (c->mon != monitor) + // continue; + // if (!(c->tags & tagmask)) + // continue; + // if (c == focused) + // focused_client = 1; + // if (c->isurgent) + // state |= ZDWL_IPC_OUTPUT_V2_TAG_STATE_URGENT; + + // numclients++; // } - // zdwl_ipc_output_v2_send_tag(ipc_output->resource, tag, state, - // numclients, focused_client); + // zdwl_ipc_output_v2_send_tag(ipc_output->resource, tag, state, numclients, + // focused_client); + // } // } + for ( tag = 0 ; tag < LENGTH(tags); tag++) { + numclients = state = focused_client = 0; + tagmask = 1 << tag; + if ((tagmask & monitor->tagset[monitor->seltags]) != 0) + state |= ZDWL_IPC_OUTPUT_V2_TAG_STATE_ACTIVE; + wl_list_for_each(c, &clients, link) { + if (c->mon != monitor) + continue; + if (!(c->tags & tagmask)) + continue; + if (c == focused) + focused_client = 1; + if (c->isurgent) + state |= ZDWL_IPC_OUTPUT_V2_TAG_STATE_URGENT; + numclients++; + } + zdwl_ipc_output_v2_send_tag(ipc_output->resource, tag, state, + numclients, focused_client); + } + title = focused ? client_get_title(focused) : ""; appid = focused ? client_get_appid(focused) : ""; symbol = monitor->pertag->ltidxs[monitor->pertag->curtag]->symbol; diff --git a/protocols/dwl-ipc-unstable-v2.xml b/protocols/dwl-ipc-unstable-v2.xml index 74a212f..0a6e7e5 100644 --- a/protocols/dwl-ipc-unstable-v2.xml +++ b/protocols/dwl-ipc-unstable-v2.xml @@ -19,7 +19,7 @@ I would probably just submit raphi's patchset but I don't think that would be po reset. - + This interface is exposed as a global in wl_registry. @@ -60,7 +60,7 @@ I would probably just submit raphi's patchset but I don't think that would be po - + Observe and control a dwl output. @@ -162,5 +162,20 @@ I would probably just submit raphi's patchset but I don't think that would be po + + + + + Indicates if the selected client on this output is fullscreen. + + + + + + + Indicates if the selected client on this output is floating. + + +