summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/input-keys.c
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2009-10-11 07:01:10 +0000
committernicm <nicm@openbsd.org>2009-10-11 07:01:10 +0000
commitd0e419ec6e21287eef292ef3bfd58b43325f80d4 (patch)
treeefce2ed2dbaf14ca54ba3545c8ae0e56fb932c6b /usr.bin/tmux/input-keys.c
parent* define a constant for the specification defined maximum number of (diff)
downloadwireguard-openbsd-d0e419ec6e21287eef292ef3bfd58b43325f80d4.tar.xz
wireguard-openbsd-d0e419ec6e21287eef292ef3bfd58b43325f80d4.zip
Clean up by introducing a wrapper struct for mouse clicks rather than passing
three u_chars around. As a side-effect this fixes incorrectly rejecting high cursor positions (because it was comparing them as signed char), reported by Tom Doherty.
Diffstat (limited to 'usr.bin/tmux/input-keys.c')
-rw-r--r--usr.bin/tmux/input-keys.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.bin/tmux/input-keys.c b/usr.bin/tmux/input-keys.c
index 5fa4640c98b..a284f9decda 100644
--- a/usr.bin/tmux/input-keys.c
+++ b/usr.bin/tmux/input-keys.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: input-keys.c,v 1.3 2009/07/26 21:42:08 nicm Exp $ */
+/* $OpenBSD: input-keys.c,v 1.4 2009/10/11 07:01:10 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -219,12 +219,12 @@ input_key(struct window_pane *wp, int key)
/* Handle input mouse. */
void
-input_mouse(struct window_pane *wp, u_char b, u_char x, u_char y)
+input_mouse(struct window_pane *wp, struct mouse_event *m)
{
if (wp->screen->mode & MODE_MOUSE) {
buffer_write(wp->out, "\033[M", 3);
- buffer_write8(wp->out, b + 32);
- buffer_write8(wp->out, x + 33);
- buffer_write8(wp->out, y + 33);
+ buffer_write8(wp->out, m->b + 32);
+ buffer_write8(wp->out, m->x + 33);
+ buffer_write8(wp->out, m->y + 33);
}
}