aboutsummaryrefslogtreecommitdiffstats
path: root/client.c
diff options
context:
space:
mode:
authorokan2015-08-21 15:52:49 +0000
committerokan2015-08-21 15:52:49 +0000
commit6e8725d167b5484a4e39edb88374a57eada98327 (patch)
treefb81171f754f0930bf52a820f514a3d267bfb143 /client.c
parente3a3da1896c03cbca5868629f6fc5bdcc09c3b31 (diff)
downloadcwm-6e8725d167b5484a4e39edb88374a57eada98327.tar.gz
Bring group and client cycle closer together.
Diffstat (limited to '')
-rw-r--r--client.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/client.c b/client.c
index 45f65b2..3506d4a 100644
--- a/client.c
+++ b/client.c
@@ -15,7 +15,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * $OpenBSD: client.c,v 1.198 2015/07/01 14:36:42 okan Exp $
+ * $OpenBSD: client.c,v 1.199 2015/08/21 15:52:49 okan Exp $
*/
#include <sys/types.h>
@@ -647,7 +647,7 @@ match:
void
client_cycle(struct screen_ctx *sc, int flags)
{
- struct client_ctx *oldcc, *newcc;
+ struct client_ctx *newcc, *oldcc;
int again = 1;
if (TAILQ_EMPTY(&sc->clientq))
@@ -655,16 +655,16 @@ client_cycle(struct screen_ctx *sc, int flags)
oldcc = client_current();
if (oldcc == NULL)
- oldcc = ((flags & CWM_RCYCLE) ?
+ oldcc = (flags & CWM_RCYCLE) ?
TAILQ_LAST(&sc->clientq, client_ctx_q) :
- TAILQ_FIRST(&sc->clientq));
+ TAILQ_FIRST(&sc->clientq);
newcc = oldcc;
while (again) {
again = 0;
- newcc = ((flags & CWM_RCYCLE) ? client_prev(newcc) :
- client_next(newcc));
+ newcc = (flags & CWM_RCYCLE) ? client_prev(newcc) :
+ client_next(newcc);
/* Only cycle visible and non-ignored windows. */
if ((newcc->flags & (CLIENT_HIDDEN|CLIENT_IGNORE))
@@ -705,20 +705,20 @@ static struct client_ctx *
client_next(struct client_ctx *cc)
{
struct screen_ctx *sc = cc->sc;
- struct client_ctx *ccc;
+ struct client_ctx *newcc;
- return(((ccc = TAILQ_NEXT(cc, entry)) != NULL) ?
- ccc : TAILQ_FIRST(&sc->clientq));
+ return(((newcc = TAILQ_NEXT(cc, entry)) != NULL) ?
+ newcc : TAILQ_FIRST(&sc->clientq));
}
static struct client_ctx *
client_prev(struct client_ctx *cc)
{
struct screen_ctx *sc = cc->sc;
- struct client_ctx *ccc;
+ struct client_ctx *newcc;
- return(((ccc = TAILQ_PREV(cc, client_ctx_q, entry)) != NULL) ?
- ccc : TAILQ_LAST(&sc->clientq, client_ctx_q));
+ return(((newcc = TAILQ_PREV(cc, client_ctx_q, entry)) != NULL) ?
+ newcc : TAILQ_LAST(&sc->clientq, client_ctx_q));
}
static void