view.c
changeset 687 a76799907854
parent 682 76b58d21ea98
child 688 39fa5308d73f
equal deleted inserted replaced
686:4fd68b1485eb 687:a76799907854
    57 	for(c = clients; c; c = c->next) {
    57 	for(c = clients; c; c = c->next) {
    58 		if(isvisible(c)) {
    58 		if(isvisible(c)) {
    59 			resize(c, True, TopLeft);
    59 			resize(c, True, TopLeft);
    60 		}
    60 		}
    61 		else
    61 		else
    62 			ban(c);
    62 			XMoveWindow(dpy, c->win, c->x + 2 * sw, c->y);
    63 	}
    63 	}
    64 	if(!sel || !isvisible(sel)) {
    64 	if(!sel || !isvisible(sel)) {
    65 		for(c = stack; c && !isvisible(c); c = c->snext);
    65 		for(c = stack; c && !isvisible(c); c = c->snext);
    66 		focus(c);
    66 		focus(c);
    67 	}
    67 	}
   107 			}
   107 			}
   108 			resize(c, False, TopLeft);
   108 			resize(c, False, TopLeft);
   109 			i++;
   109 			i++;
   110 		}
   110 		}
   111 		else
   111 		else
   112 			ban(c);
   112 			XMoveWindow(dpy, c->win, c->x + 2 * sw, c->y);
   113 
       
   114 	if(!sel || !isvisible(sel)) {
   113 	if(!sel || !isvisible(sel)) {
   115 		for(c = stack; c && !isvisible(c); c = c->snext);
   114 		for(c = stack; c && !isvisible(c); c = c->snext);
   116 		focus(c);
   115 		focus(c);
   117 	}
   116 	}
   118 	restack();
   117 	restack();
   189 
   188 
   190 	if(!sel) {
   189 	if(!sel) {
   191 		drawstatus();
   190 		drawstatus();
   192 		return;
   191 		return;
   193 	}
   192 	}
   194 	if(sel->isfloat || arrange == dofloat) {
   193 	if(sel->isfloat || arrange == dofloat)
   195 		XRaiseWindow(dpy, sel->win);
   194 		XRaiseWindow(dpy, sel->win);
   196 		XRaiseWindow(dpy, sel->twin);
       
   197 	}
       
   198 	if(arrange != dofloat) {
   195 	if(arrange != dofloat) {
   199 		if(!sel->isfloat) {
   196 		if(!sel->isfloat)
   200 			XLowerWindow(dpy, sel->twin);
       
   201 			XLowerWindow(dpy, sel->win);
   197 			XLowerWindow(dpy, sel->win);
   202 		}
       
   203 		for(c = nexttiled(clients); c; c = nexttiled(c->next)) {
   198 		for(c = nexttiled(clients); c; c = nexttiled(c->next)) {
   204 			if(c == sel)
   199 			if(c == sel)
   205 				continue;
   200 				continue;
   206 			XLowerWindow(dpy, c->twin);
       
   207 			XLowerWindow(dpy, c->win);
   201 			XLowerWindow(dpy, c->win);
   208 		}
   202 		}
   209 	}
   203 	}
   210 	drawall();
   204 	drawall();
   211 	XSync(dpy, False);
   205 	XSync(dpy, False);