ref: a757798f9113eeb71a57f24fa0edc9600eb62a8c
parent: 5952c258d1d5cb943706156aac22f59659e60827
author: qwx <qwx@sciops.net>
date: Sat Dec 18 15:24:25 EST 2021
add samterm/mousefocus: move to focus
--- a/samterm-fullfrontalnudity
+++ b/samterm-fullfrontalnudity
@@ -1,4 +1,4 @@
-diff 4584fbf577c30963a958dc79607be3e37b5fab3a uncommitted
+diff 614f1d6268fd986fc628eec3754bd4599363ad13 uncommitted
--- a//sys/src/cmd/samterm/flayer.h
+++ b//sys/src/cmd/samterm/flayer.h
@@ -42,9 +42,9 @@
@@ -118,21 +118,12 @@
int m, i;
Text *t;
-+ l = flwhich(mousep->xy);
++ l = which;
mw = -1;
switch(m = menuhit(3, mousectl, &menu3, nil)){
case -1:
-@@ -133,52 +134,36 @@
- break;
+@@ -139,46 +140,29 @@
- case New:
-- if(!hostlock)
-- sweeptext(1, 0);
-+ if(hostlock)
-+ break;
-+ sweeptext(1, 0);
- break;
-
case Zerox:
case Resize:
- if(!hostlock){
@@ -194,14 +185,6 @@
break;
default:
-@@ -198,7 +183,6 @@
- }
- }
-
--
- Text *
- sweeptext(int new, int tag)
- {
@@ -205,23 +189,27 @@
Rectangle r;
Text *t;
--- /dev/null
+++ b/samterm-mousefocus
@@ -1,0 +1,17 @@
+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)