diff options
author | Nicholas Marriott <nicm@openbsd.org> | 2009-10-11 07:01:10 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@openbsd.org> | 2009-10-11 07:01:10 +0000 |
commit | 4bc0f6e7e9eac73f7a1221ed4c2854d12eb1cf7e (patch) | |
tree | 2bafaa9c2cb171ff453fa7069ddc4286051f3e28 /input-keys.c | |
parent | f68ade7b1d1c3aa74a11a5eeed35ea409d5d63c7 (diff) | |
download | rtmux-4bc0f6e7e9eac73f7a1221ed4c2854d12eb1cf7e.tar.gz rtmux-4bc0f6e7e9eac73f7a1221ed4c2854d12eb1cf7e.tar.bz2 rtmux-4bc0f6e7e9eac73f7a1221ed4c2854d12eb1cf7e.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 'input-keys.c')
-rw-r--r-- | input-keys.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/input-keys.c b/input-keys.c index 30e2be05..f73bcf36 100644 --- a/input-keys.c +++ b/input-keys.c @@ -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); } } |