From be12562ab7c2412379b48e076ec9218a8d2dbdb1 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Sun, 23 Mar 2008 20:58:39 +0100 Subject: [PATCH] Stop client_find_visible to loop for ever Signed-off-by: Julien Danjou --- client.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client.c b/client.c index 8a4b81688..441f03579 100644 --- a/client.c +++ b/client.c @@ -823,7 +823,7 @@ client_find_visible(Client *sel, Bool reverse) /* look for previous or next starting at sel */ for(next = client_iter(&globalconf.clients, sel); - next && (next->skip || !client_isvisible(next, sel->screen)); + next && next != sel && (next->skip || !client_isvisible(next, sel->screen)); next = client_iter(&globalconf.clients, next)); return next;