From 21f94c6aa8f7753b6ba8e738bcdcf29567e3f7f9 Mon Sep 17 00:00:00 2001 From: okan Date: Wed, 14 Sep 2016 19:45:33 +0000 Subject: Fix-up a few simple uses of client_current(): check CLIENT_ACTIVE flag instead of relying on curcc. --- search.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'search.c') diff --git a/search.c b/search.c index e1e19c8..f179e81 100644 --- a/search.c +++ b/search.c @@ -15,7 +15,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $OpenBSD: search.c,v 1.51 2015/08/27 18:53:15 okan Exp $ + * $OpenBSD: search.c,v 1.52 2016/09/14 19:45:33 okan Exp $ */ #include @@ -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 = '&'; -- cgit v1.2.3-2-gb3c3