summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr.bin/tmux/cmd-resize-pane.c4
-rw-r--r--usr.bin/tmux/cmd.c6
-rw-r--r--usr.bin/tmux/server-client.c6
-rw-r--r--usr.bin/tmux/window-copy.c4
4 files changed, 11 insertions, 9 deletions
diff --git a/usr.bin/tmux/cmd-resize-pane.c b/usr.bin/tmux/cmd-resize-pane.c
index e2711934027..d5d78eff37d 100644
--- a/usr.bin/tmux/cmd-resize-pane.c
+++ b/usr.bin/tmux/cmd-resize-pane.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-resize-pane.c,v 1.36 2019/05/03 16:51:29 nicm Exp $ */
+/* $OpenBSD: cmd-resize-pane.c,v 1.37 2019/05/03 18:42:40 nicm Exp $ */
/*
* Copyright (c) 2009 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -143,7 +143,7 @@ cmd_resize_pane_mouse_update(struct client *c, struct mouse_event *m)
}
w = wl->window;
- y = m->y; x = m->x;
+ y = m->y + m->oy; x = m->x + m->ox;
if (m->statusat == 0 && y > 0)
y--;
else if (m->statusat > 0 && y >= (u_int)m->statusat)
diff --git a/usr.bin/tmux/cmd.c b/usr.bin/tmux/cmd.c
index 8dcc9103acd..54f1c86a87a 100644
--- a/usr.bin/tmux/cmd.c
+++ b/usr.bin/tmux/cmd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd.c,v 1.145 2019/05/03 16:51:29 nicm Exp $ */
+/* $OpenBSD: cmd.c,v 1.146 2019/05/03 18:42:40 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -484,8 +484,8 @@ cmd_mouse_at(struct window_pane *wp, struct mouse_event *m, u_int *xp,
x = m->lx + m->ox;
y = m->ly + m->oy;
} else {
- x = m->x;
- y = m->y;
+ x = m->x + m->ox;
+ y = m->y + m->oy;
}
log_debug("%s: x=%u, y=%u%s", __func__, x, y, last ? " (last)" : "");
diff --git a/usr.bin/tmux/server-client.c b/usr.bin/tmux/server-client.c
index a5d5e5d0b25..87ae28da0dc 100644
--- a/usr.bin/tmux/server-client.c
+++ b/usr.bin/tmux/server-client.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: server-client.c,v 1.277 2019/05/03 16:51:29 nicm Exp $ */
+/* $OpenBSD: server-client.c,v 1.278 2019/05/03 18:42:40 nicm Exp $ */
/*
* Copyright (c) 2009 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -448,6 +448,8 @@ server_client_check_mouse(struct client *c, struct key_event *event)
type = DRAG;
if (c->tty.mouse_drag_flag) {
x = m->x, y = m->y, b = m->b;
+ if (x == m->lx && y == m->ly)
+ return (KEYC_UNKNOWN);
log_debug("drag update at %u,%u", x, y);
} else {
x = m->lx, y = m->ly, b = m->lb;
@@ -555,8 +557,6 @@ have_event:
return (KEYC_UNKNOWN);
px = px + m->ox;
py = py + m->oy;
- m->x = x + m->ox;
- m->y = y + m->oy;
/* Try the pane borders if not zoomed. */
if (~s->curw->window->flags & WINDOW_ZOOMED) {
diff --git a/usr.bin/tmux/window-copy.c b/usr.bin/tmux/window-copy.c
index 661d69fbfd2..660aa77a2ed 100644
--- a/usr.bin/tmux/window-copy.c
+++ b/usr.bin/tmux/window-copy.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: window-copy.c,v 1.219 2019/05/01 06:07:14 nicm Exp $ */
+/* $OpenBSD: window-copy.c,v 1.220 2019/05/03 18:42:40 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -3505,6 +3505,8 @@ window_copy_start_drag(struct client *c, struct mouse_event *m)
window_copy_update_cursor(wme, x, y);
window_copy_start_selection(wme);
window_copy_redraw_screen(wme);
+
+ window_copy_drag_update(c, m);
}
static void