view.c
changeset 442 056a5072c70a
parent 437 433a5c662f73
child 443 548084f8d92e
equal deleted inserted replaced
441:785bad5f21dd 442:056a5072c70a
    16 		if(c->weight < min->weight)
    16 		if(c->weight < min->weight)
    17 			min = c;
    17 			min = c;
    18 	return min;
    18 	return min;
    19 }
    19 }
    20 
    20 
       
    21 static void
       
    22 pop(Client *c)
       
    23 {
       
    24 	detach(c);
       
    25 	if(clients)
       
    26 		clients->prev = c;
       
    27 	c->next = clients;
       
    28 	clients = c;
       
    29 }
    21 
    30 
    22 static void
    31 static void
    23 reorder()
    32 reorder()
    24 {
    33 {
    25 	Client *c, *newclients, *tail;
    34 	Client *c, *newclients, *tail;
   221 	if(!sel) {
   230 	if(!sel) {
   222 		drawstatus();
   231 		drawstatus();
   223 		return;
   232 		return;
   224 	}
   233 	}
   225 	if(sel->isfloat || arrange == dofloat) {
   234 	if(sel->isfloat || arrange == dofloat) {
       
   235 		pop(sel);
   226 		XRaiseWindow(dpy, sel->win);
   236 		XRaiseWindow(dpy, sel->win);
   227 		XRaiseWindow(dpy, sel->twin);
   237 		XRaiseWindow(dpy, sel->twin);
   228 	}
   238 	}
   229 	if(arrange != dofloat) 
   239 	if(arrange != dofloat) 
   230 		for(c = nexttiled(clients); c; c = nexttiled(c->next)) {
   240 		for(c = nexttiled(clients); c; c = nexttiled(c->next)) {
   295 		return;
   305 		return;
   296 
   306 
   297 	if((c = sel) == nexttiled(clients))
   307 	if((c = sel) == nexttiled(clients))
   298 		if(!(c = nexttiled(c->next)))
   308 		if(!(c = nexttiled(c->next)))
   299 			return;
   309 			return;
   300 	detach(c);
   310 	pop(c);
   301 	c->next = clients;
       
   302 	clients->prev = c;
       
   303 	clients = c;
       
   304 	focus(c);
   311 	focus(c);
   305 	arrange(NULL);
   312 	arrange(NULL);
   306 }
   313 }