diff options
author | okan <okan> | 2016-10-06 14:30:05 +0000 |
---|---|---|
committer | okan <okan> | 2016-10-06 14:30:05 +0000 |
commit | 66f5360fd48401a1d8ac204e36567597a3974164 (patch) | |
tree | 801643d8ad6ca343c6a68fc817b2db83cde63257 | |
parent | e7dcb17e1e5df88e90efd67e63d46f0435ad8099 (diff) | |
download | cwm-66f5360fd48401a1d8ac204e36567597a3974164.tar.gz cwm-66f5360fd48401a1d8ac204e36567597a3974164.tar.xz cwm-66f5360fd48401a1d8ac204e36567597a3974164.zip |
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.
-rw-r--r-- | client.c | 4 |
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); } |