diff options
author | Okan Demirmen <okan@cvs.openbsd.org> | 2011-09-13 08:37:50 +0000 |
---|---|---|
committer | Okan Demirmen <okan@cvs.openbsd.org> | 2011-09-13 08:37:50 +0000 |
commit | b2517a4e636d877b67273b1120d46358a9f40de7 (patch) | |
tree | bfaf697b40682b06177246a0f50a04d2f05316e0 /app/cwm | |
parent | 4e647bfe62b1b15e5b3c9d51945f29663ad0180d (diff) |
repair groupcycle (broke after cycle-in-group support added more flags);
found by and fix from Thomas Pfaff.
ok oga@
Diffstat (limited to 'app/cwm')
-rw-r--r-- | app/cwm/group.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/app/cwm/group.c b/app/cwm/group.c index cbc695165..f1acf19e7 100644 --- a/app/cwm/group.c +++ b/app/cwm/group.c @@ -16,7 +16,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $OpenBSD: group.c,v 1.51 2011/07/25 15:10:24 okan Exp $ + * $OpenBSD: group.c,v 1.52 2011/09/13 08:37:49 okan Exp $ */ #include <sys/param.h> @@ -313,7 +313,7 @@ group_only(struct screen_ctx *sc, int idx) * Cycle through active groups. If none exist, then just stay put. */ void -group_cycle(struct screen_ctx *sc, int reverse) +group_cycle(struct screen_ctx *sc, int flags) { struct group_ctx *gc, *showgroup = NULL; @@ -321,11 +321,11 @@ group_cycle(struct screen_ctx *sc, int reverse) gc = sc->group_active; for (;;) { - gc = reverse ? TAILQ_PREV(gc, group_ctx_q, entry) : - TAILQ_NEXT(gc, entry); + gc = (flags & CWM_RCYCLE) ? TAILQ_PREV(gc, group_ctx_q, + entry) : TAILQ_NEXT(gc, entry); if (gc == NULL) - gc = reverse ? TAILQ_LAST(&sc->groupq, group_ctx_q) : - TAILQ_FIRST(&sc->groupq); + gc = (flags & CWM_RCYCLE) ? TAILQ_LAST(&sc->groupq, + group_ctx_q) : TAILQ_FIRST(&sc->groupq); if (gc == sc->group_active) break; |