view.c
changeset 393 6786cd59468f
parent 388 aba385c61b3b
child 395 7528080beb0e
equal deleted inserted replaced
392:278277287de6 393:6786cd59468f
    65 			resize(c, True, TopLeft);
    65 			resize(c, True, TopLeft);
    66 		}
    66 		}
    67 		else
    67 		else
    68 			ban(c);
    68 			ban(c);
    69 	}
    69 	}
    70 	if((sel = getnext(clients)))
    70 	if(!sel || !isvisible(sel))
       
    71 		sel = getnext(clients);
       
    72 	if(sel)
    71 		focus(sel);
    73 		focus(sel);
    72 	else
    74 	else
    73 		XSetInputFocus(dpy, root, RevertToPointerRoot, CurrentTime);
    75 		XSetInputFocus(dpy, root, RevertToPointerRoot, CurrentTime);
    74 	restack();
    76 	restack();
    75 }
    77 }
   128 			i++;
   130 			i++;
   129 		}
   131 		}
   130 		else
   132 		else
   131 			ban(c);
   133 			ban(c);
   132 	}
   134 	}
   133 	if((sel = getnext(clients)))
   135 	if(!sel || !isvisible(sel))
       
   136 		sel = getnext(clients);
       
   137 	if(sel)
   134 		focus(sel);
   138 		focus(sel);
   135 	else
   139 	else
   136 		XSetInputFocus(dpy, root, RevertToPointerRoot, CurrentTime);
   140 		XSetInputFocus(dpy, root, RevertToPointerRoot, CurrentTime);
   137 	restack();
   141 	restack();
   138 }
   142 }