tag.c
changeset 289 6562340b9ffc
parent 287 5e5e5392c7cb
child 306 71f02d14dce1
equal deleted inserted replaced
288:b7865e6feef2 289:6562340b9ffc
    45 			resize(c, True, TopLeft);
    45 			resize(c, True, TopLeft);
    46 		}
    46 		}
    47 		else
    47 		else
    48 			ban(c);
    48 			ban(c);
    49 	}
    49 	}
    50 	if((sel = getnext(clients))) {
    50 	if(!sel || !isvisible(sel))
       
    51 		sel = getnext(clients);
       
    52 	if(sel) {
    51 		focus(sel);
    53 		focus(sel);
    52 		restack();
    54 		restack();
    53 	}
    55 	}
    54 	else
    56 	else
    55 		XSetInputFocus(dpy, root, RevertToPointerRoot, CurrentTime);
    57 		XSetInputFocus(dpy, root, RevertToPointerRoot, CurrentTime);
   109 			i++;
   111 			i++;
   110 		}
   112 		}
   111 		else
   113 		else
   112 			ban(c);
   114 			ban(c);
   113 	}
   115 	}
   114 	if((sel = getnext(clients)))
   116 	if(!sel || !isvisible(sel))
       
   117 		sel = getnext(clients);
       
   118 	if(sel)
   115 		focus(sel);
   119 		focus(sel);
   116 	else
   120 	else
   117 		XSetInputFocus(dpy, root, RevertToPointerRoot, CurrentTime);
   121 		XSetInputFocus(dpy, root, RevertToPointerRoot, CurrentTime);
   118 	restack();
   122 	restack();
   119 }
   123 }