layout.c
changeset 875 73cd10af065a
parent 871 75aa81011594
child 878 d2ae55f83f9f
equal deleted inserted replaced
874:e42bdee29c92 875:73cd10af065a
    59 		}
    59 		}
    60 		else {
    60 		else {
    61 			c->isbanned = True;
    61 			c->isbanned = True;
    62 			XMoveWindow(dpy, c->win, c->x + 2 * sw, c->y);
    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 		focustopvisible();
    66 		focus(c);
       
    67 	}
       
    68 	restack();
    66 	restack();
    69 }
    67 }
    70 
    68 
    71 LAYOUTS
    69 LAYOUTS
    72 
    70 
    86 		else {
    84 		else {
    87 			c->isbanned = True;
    85 			c->isbanned = True;
    88 			XMoveWindow(dpy, c->win, c->x + 2 * sw, c->y);
    86 			XMoveWindow(dpy, c->win, c->x + 2 * sw, c->y);
    89 		}
    87 		}
    90 	}
    88 	}
    91 	if(!sel || !isvisible(sel)) {
    89 	if(!sel || !isvisible(sel))
    92 		for(c = stack; c && !isvisible(c); c = c->snext);
    90 		focustopvisible();
    93 		focus(c);
       
    94 	}
       
    95 	restack();
    91 	restack();
    96 }
    92 }
    97 
    93 
    98 void
    94 void
    99 focusclient(const char *arg) {
    95 focusclient(const char *arg) {
   239 	while(XCheckMaskEvent(dpy, EnterWindowMask, &ev));
   235 	while(XCheckMaskEvent(dpy, EnterWindowMask, &ev));
   240 }
   236 }
   241 
   237 
   242 void
   238 void
   243 zoom(const char *arg) {
   239 zoom(const char *arg) {
   244 	unsigned int n;
       
   245 	Client *c;
   240 	Client *c;
   246 
   241 
   247 	if(!sel || lt->arrange != tile || sel->isfloating)
   242 	if(!sel || lt->arrange != tile || sel->isfloating)
   248 		return;
   243 		return;
   249 	for(n = 0, c = nexttiled(clients); c; c = nexttiled(c->next))
       
   250 		n++;
       
   251 	if((c = sel) == nexttiled(clients))
   244 	if((c = sel) == nexttiled(clients))
   252 		if(!(c = nexttiled(c->next)))
   245 		if(!(c = nexttiled(c->next)))
   253 			return;
   246 			return;
   254 	detach(c);
   247 	detach(c);
   255 	attach(c);
   248 	attach(c);