From 2c149b25d3b375545797d7f213a7dcc138f8ba23 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Wed, 26 Sep 2007 18:56:58 +0200 Subject: [PATCH] optimize a little isvisible() --- tag.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tag.c b/tag.c index 51a87b62..68ca2285 100644 --- a/tag.c +++ b/tag.c @@ -139,8 +139,11 @@ isvisible(Client * c, int screen, Tag * tags, int ntags) { int i; + if(c->screen != screen) + return False; + for(i = 0; i < ntags; i++) - if(c->tags[i] && tags[i].selected && c->screen == screen) + if(c->tags[i] && tags[i].selected) return True; return False; }