view: store title/app_id in view

This simplifies our codes and eliminates duplicated
`view.events.new_{title,app_id}` events. This should not change any
behaviors.
This commit is contained in:
tokyo4j 2025-08-13 17:40:25 +09:00 committed by Hiroaki Yamamoto
parent 27cc738985
commit babd7af8f8
13 changed files with 87 additions and 155 deletions

View file

@ -71,11 +71,10 @@ get_view_part(struct view *view, struct wlr_scene_node *node)
return NULL;
}
if (node == &view->scene_tree->node) {
const char *app_id = view_get_string_prop(view, "app_id");
if (string_null_or_empty(app_id)) {
if (string_null_or_empty(view->app_id)) {
return "view";
}
snprintf(view_name, sizeof(view_name), "view (%s)", app_id);
snprintf(view_name, sizeof(view_name), "view (%s)", view->app_id);
return view_name;
}
if (node == &view->content_tree->node) {