2 nextc(Client
*c
, float f
) {
6 for(; c
&& !ISVISIBLE(c
); c
= c
->next
);
11 prevc(Client
*c
, float f
) {
14 for(p
= selmon
->clients
, r
= NULL
; c
&& p
&& p
!= c
; p
= p
->next
)
15 if((f
|| !p
->isfloating
) && ISVISIBLE(p
))
21 pushup(const Arg
*arg
) {
22 Client
*sel
= selmon
->sel
;
25 if(!sel
|| (sel
->isfloating
&& !arg
->f
))
27 if((c
= prevc(sel
, arg
->f
))) {
31 if(selmon
->clients
== c
)
32 selmon
->clients
= sel
;
34 for(c
= selmon
->clients
; c
->next
!= sel
->next
; c
= c
->next
);
39 for(c
= sel
; c
->next
; c
= c
->next
);
49 pushdown(const Arg
*arg
) {
50 Client
*sel
= selmon
->sel
;
53 if(!sel
|| (sel
->isfloating
&& !arg
->f
))
55 if((c
= nextc(sel
->next
, arg
->f
))) {
61 /* move to the front */