switch to search_print_client() as the print callback since it will now display labels as well

This commit is contained in:
okan 2015-06-08 15:41:27 +00:00
parent 8888c44888
commit e9750e2144

View File

@ -204,23 +204,18 @@ mousefunc_menu_unhide(struct client_ctx *cc, union arg *arg)
struct client_ctx *old_cc; struct client_ctx *old_cc;
struct menu *mi; struct menu *mi;
struct menu_q menuq; struct menu_q menuq;
char *wname;
old_cc = client_current(); old_cc = client_current();
TAILQ_INIT(&menuq); TAILQ_INIT(&menuq);
TAILQ_FOREACH(cc, &sc->clientq, entry) { TAILQ_FOREACH(cc, &sc->clientq, entry) {
if (cc->flags & CLIENT_HIDDEN) { if (cc->flags & CLIENT_HIDDEN) {
wname = (cc->label) ? cc->label : cc->name; menuq_add(&menuq, cc, NULL);
if (wname == NULL)
continue;
menuq_add(&menuq, cc, "(%d) %s",
cc->group ? cc->group->num : 0, wname);
} }
} }
if ((mi = menu_filter(sc, &menuq, NULL, NULL, CWM_MENU_LIST, if ((mi = menu_filter(sc, &menuq, NULL, NULL, CWM_MENU_LIST,
NULL, NULL)) != NULL) { NULL, search_print_client)) != NULL) {
cc = (struct client_ctx *)mi->ctx; cc = (struct client_ctx *)mi->ctx;
client_unhide(cc); client_unhide(cc);
if (old_cc != NULL) if (old_cc != NULL)