aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBen Huntsman <ben@huntsmans.net>2022-05-12 16:52:00 -0700
committerDan Cross <crossd@gmail.com>2022-07-26 12:04:01 -0400
commit686f5d035cc111a6a18d918ef60929f24b0cb424 (patch)
tree5c14fbb1c03dfe8845bbe404827904281032fb99 /src
parent964ac74cdc9d9bd22aec10bba850db93c4445cc5 (diff)
acme: Don't move the mouse if button depressed
Fixes #19
Diffstat (limited to 'src')
-rw-r--r--src/cmd/acme/cols.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/cmd/acme/cols.c b/src/cmd/acme/cols.c
index 63247a84..30f64c8e 100644
--- 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;
}