diff options
author | Okan Demirmen <okan@cvs.openbsd.org> | 2014-09-08 21:24:28 +0000 |
---|---|---|
committer | Okan Demirmen <okan@cvs.openbsd.org> | 2014-09-08 21:24:28 +0000 |
commit | 90f4282a0fabfa5de57908a0f9bc65b4c0a1a443 (patch) | |
tree | 75d4dc6d746bd8e8632fe6eed60bbaee14d5f4e0 /app | |
parent | 1198b2e494c824d6ac584781f813f00fde7de352 (diff) |
move the check for an empty queue up during cycle
Diffstat (limited to 'app')
-rw-r--r-- | app/cwm/client.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/app/cwm/client.c b/app/cwm/client.c index c2e13db15..64c8d08ec 100644 --- a/app/cwm/client.c +++ b/app/cwm/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.180 2014/09/08 21:15:14 okan Exp $ + * $OpenBSD: client.c,v 1.181 2014/09/08 21:24:27 okan Exp $ */ #include <sys/param.h> @@ -639,12 +639,10 @@ client_cycle(struct screen_ctx *sc, int flags) struct client_ctx *oldcc, *newcc; int again = 1; - oldcc = client_current(); - - /* If no windows then you cant cycle */ if (TAILQ_EMPTY(&sc->clientq)) return; + oldcc = client_current(); if (oldcc == NULL) oldcc = (flags & CWM_RCYCLE ? TAILQ_LAST(&sc->clientq, client_ctx_q) : |