menu: add minimised state akin to openbox

This commit is contained in:
David Barr 2025-08-21 19:36:31 +01:00 committed by GitHub
parent 13dd2dd606
commit f74a564dfc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -900,7 +900,6 @@ update_client_list_combined_menu(struct server *server)
wl_list_for_each(view, &server->views, link) { wl_list_for_each(view, &server->views, link) {
if (view->workspace == workspace) { if (view->workspace == workspace) {
const char *title = view_get_string_prop(view, "title"); const char *title = view_get_string_prop(view, "title");
const char *appid = view_get_string_prop(view, "app_id");
if (!view->foreign_toplevel || string_null_or_empty(title)) { if (!view->foreign_toplevel || string_null_or_empty(title)) {
continue; continue;
} }
@ -909,10 +908,9 @@ update_client_list_combined_menu(struct server *server)
buf_add(&buffer, "*"); buf_add(&buffer, "*");
} }
if (view->minimized) { if (view->minimized) {
buf_add_fmt(&buffer, "(%s - %s)", title, appid); buf_add_fmt(&buffer, "(%s)", title);
} } else
else buf_add(&buffer, title);
buf_add_fmt(&buffer, "%s - %s", title, appid);
item = item_create(menu, buffer.data, NULL, item = item_create(menu, buffer.data, NULL,
/*show arrow*/ false); /*show arrow*/ false);