diff options
author | okan <okan> | 2016-10-18 17:03:30 +0000 |
---|---|---|
committer | okan <okan> | 2016-10-18 17:03:30 +0000 |
commit | 0bb1be86c69ea95103e1a6b38c093406a47cdb07 (patch) | |
tree | b7aa2c4a5a2c09bb20637f0c50dd4c01377abda0 /client.c | |
parent | 38eac7d7e9d36243271eb7f968a3152c9eb0cfbc (diff) | |
download | cwm-0bb1be86c69ea95103e1a6b38c093406a47cdb07.tar.gz cwm-0bb1be86c69ea95103e1a6b38c093406a47cdb07.tar.xz cwm-0bb1be86c69ea95103e1a6b38c093406a47cdb07.zip |
Refactor callbacks to take a void * so as to not try and generalize into
client_ctx in keypress and buttonpress event handlers; pass appropriate *ctx's based on context. While here, limit some globals, replace defines with appropriate variables and fix some naming.
Diffstat (limited to 'client.c')
-rw-r--r-- | client.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/client.c b/client.c index ab84b9a..58d7f88 100644 --- a/client.c +++ b/client.c @@ -653,20 +653,20 @@ client_cycle(struct screen_ctx *sc, int flags) oldcc = client_current(); if (oldcc == NULL) - oldcc = (flags & CWM_CLIENT_RCYCLE) ? - TAILQ_LAST(&sc->clientq, client_ctx_q) : + oldcc = (flags & CWM_CYCLE_REVERSE) ? + TAILQ_LAST(&sc->clientq, client_q) : TAILQ_FIRST(&sc->clientq); newcc = oldcc; while (again) { again = 0; - newcc = (flags & CWM_CLIENT_RCYCLE) ? client_prev(newcc) : + newcc = (flags & CWM_CYCLE_REVERSE) ? client_prev(newcc) : client_next(newcc); /* Only cycle visible and non-ignored windows. */ if ((newcc->flags & (CLIENT_HIDDEN | CLIENT_IGNORE)) - || ((flags & CWM_CLIENT_CYCLE_INGRP) && + || ((flags & CWM_CYCLE_INGROUP) && (newcc->gc != oldcc->gc))) again = 1; @@ -721,8 +721,8 @@ client_prev(struct client_ctx *cc) struct screen_ctx *sc = cc->sc; struct client_ctx *newcc; - return(((newcc = TAILQ_PREV(cc, client_ctx_q, entry)) != NULL) ? - newcc : TAILQ_LAST(&sc->clientq, client_ctx_q)); + return(((newcc = TAILQ_PREV(cc, client_q, entry)) != NULL) ? + newcc : TAILQ_LAST(&sc->clientq, client_q)); } static void |