mirror of
https://github.com/labwc/labwc.git
synced 2025-11-30 06:59:52 -05:00
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:
parent
27cc738985
commit
babd7af8f8
13 changed files with 87 additions and 155 deletions
|
|
@ -900,8 +900,8 @@ update_client_list_combined_menu(struct server *server)
|
|||
|
||||
wl_list_for_each(view, &server->views, link) {
|
||||
if (view->workspace == workspace) {
|
||||
const char *title = view_get_string_prop(view, "title");
|
||||
if (!view->foreign_toplevel || string_null_or_empty(title)) {
|
||||
if (!view->foreign_toplevel
|
||||
|| string_null_or_empty(view->title)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
@ -909,9 +909,9 @@ update_client_list_combined_menu(struct server *server)
|
|||
buf_add(&buffer, "*");
|
||||
}
|
||||
if (view->minimized) {
|
||||
buf_add_fmt(&buffer, "(%s)", title);
|
||||
buf_add_fmt(&buffer, "(%s)", view->title);
|
||||
} else {
|
||||
buf_add(&buffer, title);
|
||||
buf_add(&buffer, view->title);
|
||||
}
|
||||
item = item_create(menu, buffer.data, NULL,
|
||||
/*show arrow*/ false);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue