From 66f5360fd48401a1d8ac204e36567597a3974164 Mon Sep 17 00:00:00 2001 From: okan Date: Thu, 6 Oct 2016 14:30:05 +0000 Subject: [PATCH] Check the ptr bounds in the new client during cycling, since not all actions do ptrsave, such as restoring client geometry; adapted from a diff by Vadim Vygonets. --- client.c | 4 ++++ 1 file changed, 4 insertions(+) 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); }