From bdd474348b1b0260fc3b0af1e741a31da86693ed Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Sat, 12 Jan 2008 22:30:19 +0100 Subject: [PATCH] use cycle functions --- client.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/client.c b/client.c index be2b2820..739ee1d1 100644 --- a/client.c +++ b/client.c @@ -706,16 +706,9 @@ client_find_prev_visible(Client *sel) if(!sel) return NULL; /* look for previous starting at sel */ - for(prev = client_list_prev(&globalconf.clients, sel); + for(prev = client_list_prev_cycle(&globalconf.clients, sel); prev && (prev->skip || !client_isvisible(prev, sel->screen)); - prev = client_list_prev(&globalconf.clients, prev)); - - /* look for previous starting at the end of the list */ - if(!prev || prev->skip || !client_isvisible(prev, sel->screen)) - for(prev = *client_list_last(&globalconf.clients); - prev && prev != sel - && (prev->skip || !client_isvisible(prev, sel->screen)); - prev = client_list_prev(&globalconf.clients, prev)); + prev = client_list_prev_cycle(&globalconf.clients, prev)); return prev; }