summary refs log tree commit diff
path: root/search.c
diff options
context:
space:
mode:
authorokan <okan>2016-09-14 19:45:33 +0000
committerokan <okan>2016-09-14 19:45:33 +0000
commitb8933ebccaba603c47d15026ed22a2afabbd9d67 (patch)
treeb4000dffcac39e3ed97b4730c69f53675808ac33 /search.c
parent9124a561e317d68454ce22c65da47cff10482ce5 (diff)
downloadcwm-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.c4
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 = '&';