mirror of
https://github.com/tmate-io/tmate.git
synced 2025-08-15 00:02:36 +02:00
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.
This commit is contained in:
@ -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);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user