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.
This commit is contained in:
okan 2016-10-06 14:30:05 +00:00
parent e7dcb17e1e
commit 66f5360fd4

View File

@ -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);
}