shithub: patch

ref: 7caa9585434c771bea1aaf6d3317b969df5afa9d
dir: /samterm-mousefocus/

View raw version
diff 614f1d6268fd986fc628eec3754bd4599363ad13 uncommitted
--- a/sys/src/cmd/samterm/main.c
+++ b/sys/src/cmd/samterm/main.c
@@ -79,6 +79,13 @@
 				continue;
 			}
 			nwhich = flwhich(mousep->xy);
+			if(nwhich && nwhich!=which){
+				Point p = mousep->xy;
+				int b = mousep->buttons;
+				current(nwhich);
+				mousep->xy = p;
+				mousep->buttons = b;
+			}
 			scr = which && (ptinrect(mousep->xy, which->scroll) ||
 				mousep->buttons&(8|16));
 			if(mousep->buttons)