fix swapping when already master

This commit is contained in:
Julien Danjou 2008-01-07 19:07:22 +01:00
parent cef0253652
commit e3f5dc81e9
1 changed files with 3 additions and 2 deletions

View File

@ -983,9 +983,10 @@ uicb_client_togglehorizontalmax(int screen, char *arg __attribute__ ((unused)))
void
uicb_client_zoom(int screen, char *arg __attribute__ ((unused)))
{
Client *sel = globalconf.focus->client;
Client *c, *sel = globalconf.focus->client;
if(globalconf.clients == sel)
for(c = globalconf.clients; !client_isvisible(c, screen); c = c->next);
if(c == sel)
for(sel = sel->next; sel && !client_isvisible(sel, screen); sel = sel->next);
if(!sel)