make swapnext cycling

This commit is contained in:
Julien Danjou 2008-01-17 14:37:27 +01:00
parent 011f771398
commit 4809b8bc6e
1 changed files with 2 additions and 0 deletions

View File

@ -683,6 +683,8 @@ uicb_client_swapnext(int screen, char *arg __attribute__ ((unused)))
return;
for(next = sel->next; next && !client_isvisible(next, screen); next = next->next);
if(!next)
for(next = globalconf.clients; next && !client_isvisible(next, screen); next = next->next);
if(next)
{
client_list_swap(&globalconf.clients, sel, next);