diff options
author | okan <okan> | 2016-09-14 19:45:33 +0000 |
---|---|---|
committer | okan <okan> | 2016-09-14 19:45:33 +0000 |
commit | b8933ebccaba603c47d15026ed22a2afabbd9d67 (patch) | |
tree | b4000dffcac39e3ed97b4730c69f53675808ac33 /search.c | |
parent | 9124a561e317d68454ce22c65da47cff10482ce5 (diff) | |
download | cwm-b8933ebccaba603c47d15026ed22a2afabbd9d67.tar.gz cwm-b8933ebccaba603c47d15026ed22a2afabbd9d67.tar.xz cwm-b8933ebccaba603c47d15026ed22a2afabbd9d67.zip |
Fix-up a few simple uses of client_current(): check CLIENT_ACTIVE flag
instead of relying on curcc.
Diffstat (limited to 'search.c')
-rw-r--r-- | search.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/search.c b/search.c index aa409e0..f52d87d 100644 --- a/search.c +++ b/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 = '&'; |