summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--client.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/client.c b/client.c
index ce7392e..ab84b9a 100644
--- a/client.c
+++ b/client.c
@@ -683,6 +683,10 @@ client_cycle(struct screen_ctx *sc, int flags)
 	sc->cycling = 1;
 	client_ptrsave(oldcc);
 	client_raise(newcc);
+	if (!client_inbound(newcc, newcc->ptr.x, newcc->ptr.y)) {
+		newcc->ptr.x = newcc->geom.w / 2;
+		newcc->ptr.y = newcc->geom.h / 2;
+	}
 	client_ptrwarp(newcc);
 }