#define MOVIE_IS_FIXED(c) ( (c)->tags == ((~0) & TAGMASK) ) void movie_attach_after(Client *c,Client *after) { c->next = after->next; after->next = c; } void movie(Monitor *m) { unsigned int n,i; Client *c,*d,*ff,*fl; ff = 0; fl = 0; for( c = nexttiled(m->clients) ; c ; ) { d = c; c = nexttiled(c->next); if ( MOVIE_IS_FIXED(d) ) { detach(d); if ( !ff ) { ff = d; fl = d; } else { movie_attach_after(d,fl); fl = d; } } } if ( !ff || !fl ) { tile(m); return; } for( d = 0,i = 0,c = nexttiled(m->clients) ; c && i < m->nmaster ; i++,d = c,c = nexttiled(c->next) ); if ( d ) { fl->next = d->next; d->next = ff; } else { fl->next = m->clients; m->clients = ff; } n = m->nmaster; m->nmaster = i; tile(m); m->nmaster = n; } #undef MOVIE_IS_FIXED