[dev] [tabbed] [PATCH] Limit mouse handling to top bar area.

From: Alexander Sedov <alex0player_AT_gmail.com>
Date: Mon, 29 Jul 2013 11:19:14 +0400

It's rather annoying when you e.g. scroll in Surf, move your mouse a little bit
too low, and Tabbed starts to switching tabs because you got caught in lower
border area. I don't think this behaviour is intentional or desirable.
---
 tabbed.c | 3 +++
 1 file changed, 3 insertions(+)
diff --git a/tabbed.c b/tabbed.c
index 9ece904..6c8a986 100644
--- a/tabbed.c
+++ b/tabbed.c
_AT_@ -175,6 +175,9 @@ buttonpress(const XEvent *e) {
 	if((getfirsttab() != 0 && ev->x < TEXTW(before)) || ev->x < 0)
 		return;
 
+	if(ev->y < 0 || ev-> y > bh)
+		return;
+
 	for(i = 0; i < nclients; i++) {
 		if(clients[i]->tabx > ev->x) {
 			switch(ev->button) {
-- 
1.8.3.2
Received on Mon Jul 29 2013 - 09:19:14 CEST

This archive was generated by hypermail 2.3.0 : Mon Jul 29 2013 - 09:24:05 CEST