update foreign_toplevel_state on title change

this commit means that in the xdg-desktop-portal-wlr picker it should
show up to date title names rather then the one the client spawned with
This commit is contained in:
Zuki Air 2025-08-05 14:30:38 +01:00
parent 8b27e5c859
commit f43772a20d

7
dwl.c
View File

@ -3012,6 +3012,13 @@ updatetitle(struct wl_listener *listener, void *data)
Client *c = wl_container_of(listener, c, set_title);
if (c == focustop(c->mon))
printstatus();
if (c->ext_foreign_toplevel) {
struct wlr_ext_foreign_toplevel_handle_v1_state foreign_toplevel_state = {
.app_id = client_get_appid(c),
.title = client_get_title(c),
};
wlr_ext_foreign_toplevel_handle_v1_update_state(c->ext_foreign_toplevel,&foreign_toplevel_state);
}
}
void