summary refs log tree commit diff
diff options
context:
space:
mode:
authorokan <okan>2011-02-13 20:09:57 +0000
committerokan <okan>2011-02-13 20:09:57 +0000
commit64e62989d01a1a14065ec220362dd67e85ce0b94 (patch)
tree14755ff9b52c9680a99eb80983af2631b8325d92
parent0884d38e3b1e458d4b247db358e8b5238b0d5774 (diff)
downloadcwm-64e62989d01a1a14065ec220362dd67e85ce0b94.tar.gz
cwm-64e62989d01a1a14065ec220362dd67e85ce0b94.tar.xz
cwm-64e62989d01a1a14065ec220362dd67e85ce0b94.zip
if we are saving the pointer location for a specific client, make sure
that if it is not already inbounds, put it in the default location,
which happens to be inbounds.

behavior noticed by Thomas Pfaff while maximizing and un-maximizing a
window, leaving the pointer behind and causing client_cycle() to be a
bit lost.

ok oga@
-rw-r--r--client.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/client.c b/client.c
index 95d9d75..8971b35 100644
--- a/client.c
+++ b/client.c
@@ -435,6 +435,9 @@ client_ptrsave(struct client_ctx *cc)
 	if (client_inbound(cc, x, y)) {
 		cc->ptr.x = x;
 		cc->ptr.y = y;
+	} else {
+		cc->ptr.x = -1;
+		cc->ptr.y = -1;
 	}
 }