opt: auto update ext_foreign_toplevel title

This commit is contained in:
DreamMaoMao 2025-08-01 19:09:28 +08:00
parent 0f65d3caa6
commit 945befbaa2

View file

@ -4972,6 +4972,14 @@ void updatetitle(struct wl_listener *listener, void *data) {
title = client_get_title(c); title = client_get_title(c);
if (title && c->foreign_toplevel) if (title && c->foreign_toplevel)
wlr_foreign_toplevel_handle_v1_set_title(c->foreign_toplevel, title); wlr_foreign_toplevel_handle_v1_set_title(c->foreign_toplevel, title);
if (title && c->ext_foreign_toplevel) {
wlr_ext_foreign_toplevel_handle_v1_update_state(
c->ext_foreign_toplevel,
&(struct wlr_ext_foreign_toplevel_handle_v1_state){
.title = title,
.app_id = c->ext_foreign_toplevel->app_id,
});
}
if (c == focustop(c->mon)) if (c == focustop(c->mon))
printstatus(); printstatus();
} }