[PATCH] Allow mouse copy-paste for programs that claim mouse to themselves by holding shift

From: Andy Chernyak <andy.chernyak_AT_gmail.com>
Date: Wed, 12 Feb 2014 00:01:50 +0100

---
 st.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/st.c b/st.c
index cad61bf..c7b9fd5 100644
--- a/st.c
+++ b/st.c
_AT_@ -898,7 +898,7 @@ bpress(XEvent *e) {
 	struct timeval now;
 	Mousekey *mk;
 
-	if(IS_SET(MODE_MOUSE)) {
+	if(IS_SET(MODE_MOUSE) && !(e->xbutton.state & ShiftMask)) {
 		mousereport(e);
 		return;
 	}
_AT_@ -1126,7 +1126,7 @@ xsetsel(char *str) {
 
 void
 brelease(XEvent *e) {
-	if(IS_SET(MODE_MOUSE)) {
+	if(IS_SET(MODE_MOUSE) && !(e->xbutton.state & ShiftMask)) {
 		mousereport(e);
 		return;
 	}
_AT_@ -1149,7 +1149,7 @@ void
 bmotion(XEvent *e) {
 	int oldey, oldex, oldsby, oldsey;
 
-	if(IS_SET(MODE_MOUSE)) {
+	if(IS_SET(MODE_MOUSE) && !(e->xbutton.state & ShiftMask)) {
 		mousereport(e);
 		return;
 	}
-- 
1.8.5.3
--------------030503020401030407000708--
Received on Mon Sep 17 2001 - 00:00:00 CEST

This archive was generated by hypermail 2.3.0 : Wed Feb 12 2014 - 00:12:34 CET