diff options
author | Tiago Cunha <tcunha@gmx.com> | 2009-10-12 00:18:19 +0000 |
---|---|---|
committer | Tiago Cunha <tcunha@gmx.com> | 2009-10-12 00:18:19 +0000 |
commit | b26ea8462ec0bb7d3d5cbeed115f6f4bbd4e1072 (patch) | |
tree | 698ba80e7b13c711d195e1b4c75adad2bfcc7d5f /input-keys.c | |
parent | 323469723b29fdd05a88e55ce9d3346f10506458 (diff) | |
download | rtmux-b26ea8462ec0bb7d3d5cbeed115f6f4bbd4e1072.tar.gz rtmux-b26ea8462ec0bb7d3d5cbeed115f6f4bbd4e1072.tar.bz2 rtmux-b26ea8462ec0bb7d3d5cbeed115f6f4bbd4e1072.zip |
Sync OpenBSD patchset 381:
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 | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/input-keys.c b/input-keys.c index e8c4804a..a279fdb6 100644 --- a/input-keys.c +++ b/input-keys.c @@ -1,4 +1,4 @@ -/* $Id: input-keys.c,v 1.29 2009-07-28 22:37:02 tcunha Exp $ */ +/* $Id: input-keys.c,v 1.30 2009-10-12 00:18:19 tcunha 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); } } |