commit 686f5d035cc111a6a18d918ef60929f24b0cb424
parent 964ac74cdc9d9bd22aec10bba850db93c4445cc5
Author: Ben Huntsman <ben@huntsmans.net>
Date: Thu, 12 May 2022 16:52:00 -0700
acme: Don't move the mouse if button depressed
Fixes #19
Diffstat:
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/cmd/acme/cols.c b/src/cmd/acme/cols.c
@@ -149,7 +149,10 @@ coladd(Column *c, Window *w, Window *clone, int y)
savemouse(w);
/* near the button, but in the body */
- moveto(mousectl, addpt(w->tag.scrollr.max, Pt(3, 3)));
+ /* don't move the mouse to the new window if a mouse button is depressed */
+ if(!mousectl->m.buttons)
+ moveto(mousectl, addpt(w->tag.scrollr.max, Pt(3, 3)));
+
barttext = &w->body;
return w;
}