mirror of
https://github.com/leahneukirchen/cwm.git
synced 2023-08-10 21:13:12 +03:00
Fix-up a few simple uses of client_current(): check CLIENT_ACTIVE flag
instead of relying on curcc.
This commit is contained in:
4
search.c
4
search.c
@ -94,7 +94,7 @@ search_match_client(struct menu_q *menuq, struct menu_q *resultq, char *search)
|
||||
* window. Furthermore, this is denoted by a "!" when
|
||||
* printing the window name in the search menu.
|
||||
*/
|
||||
if (cc == client_current() && tier < nitems(tierp) - 1)
|
||||
if ((cc->flags & CLIENT_ACTIVE) && (tier < nitems(tierp) - 1))
|
||||
tier++;
|
||||
|
||||
/* Clients that are hidden get ranked one up. */
|
||||
@ -147,7 +147,7 @@ search_print_client(struct menu *mi, int list)
|
||||
struct client_ctx *cc = (struct client_ctx *)mi->ctx;
|
||||
char flag = ' ';
|
||||
|
||||
if (cc == client_current())
|
||||
if (cc->flags & CLIENT_ACTIVE)
|
||||
flag = '!';
|
||||
else if (cc->flags & CLIENT_HIDDEN)
|
||||
flag = '&';
|
||||
|
Reference in New Issue
Block a user