aboutsummaryrefslogtreecommitdiffstats
path: root/client.c
diff options
context:
space:
mode:
authorokan2014-09-08 21:24:27 +0000
committerokan2014-09-08 21:24:27 +0000
commitbbf203a8387ca3e0b0a93c08aa89d543fc56ebc2 (patch)
tree92cc705a8f2dfd162bd5b2126eeff38f9ee81a2f /client.c
parent793ad81495bd915b0baf0c165ad95f0058936336 (diff)
downloadcwm-bbf203a8387ca3e0b0a93c08aa89d543fc56ebc2.tar.gz
move the check for an empty queue up during cycle
Diffstat (limited to 'client.c')
-rw-r--r--client.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/client.c b/client.c
index c2e13db..64c8d08 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.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) :