diff --git a/protocols/dwl-ipc-unstable-v2.xml b/protocols/dwl-ipc-unstable-v2.xml index 5852107e..868d7ae0 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. @@ -128,6 +128,17 @@ I would probably just submit raphi's patchset but I don't think that would be po + + + Reports a single managed client on this output, with its appid, title, + and tag bitmask. Fired once per client per state-update batch, after + all tag events and before frame. + + + + + + Indicates the layout has changed. Since layout symbols are dynamic. diff --git a/src/ext-protocol/dwl-ipc.h b/src/ext-protocol/dwl-ipc.h index ab0bdb8d..f6fca18b 100644 --- a/src/ext-protocol/dwl-ipc.h +++ b/src/ext-protocol/dwl-ipc.h @@ -212,6 +212,21 @@ void dwl_ipc_output_printstatus_to(DwlIpcOutput *ipc_output) { } zdwl_ipc_output_v2_send_frame(ipc_output->resource); + + //recently added + if (wl_resource_get_version(ipc_output->resource) >= ZDWL_IPC_OUTPUT_V2_CLIENT_SINCE_VERSION) { + const char *c_appid, *c_title; + wl_list_for_each(c, &clients, link) { + if (c->mon != monitor) + continue; + c_appid = client_get_appid(c); + c_title = client_get_title(c); + zdwl_ipc_output_v2_send_client(ipc_output->resource, + c_appid ? c_appid : broken, + c_title ? c_title : broken, + c->tags); + } + } } void dwl_ipc_output_set_client_tags(struct wl_client *client, diff --git a/src/mango.c b/src/mango.c index 85fc00ac..62702c93 100644 --- a/src/mango.c +++ b/src/mango.c @@ -5802,7 +5802,8 @@ void setup(void) { wlr_log(WLR_INFO, "VR will not be available."); } - wl_global_create(dpy, &zdwl_ipc_manager_v2_interface, 2, NULL, + + wl_global_create(dpy, &zdwl_ipc_manager_v2_interface, 3, NULL, dwl_ipc_manager_bind); // 创建顶层管理句柄