diff options
author | Thomas Adam <thomas@xteddy.org> | 2012-10-26 20:28:58 +0100 |
---|---|---|
committer | Thomas Adam <thomas@xteddy.org> | 2012-10-26 20:28:58 +0100 |
commit | 47fbf87185ff60c201bffa432092035cafcc220f (patch) | |
tree | 00de0956f2c22759d4c865c0932594d0ce6dd9c4 /input-keys.c | |
parent | 31f93d84458dca70b94f1b20fa67f64e08e05305 (diff) | |
parent | d210d99ccecfaa2ef23a65609dc8cbb26bcfe236 (diff) | |
download | rtmux-47fbf87185ff60c201bffa432092035cafcc220f.tar.gz rtmux-47fbf87185ff60c201bffa432092035cafcc220f.tar.bz2 rtmux-47fbf87185ff60c201bffa432092035cafcc220f.zip |
Merge branch 'obsd-master'
Sync from OpenBSD.
Diffstat (limited to 'input-keys.c')
-rw-r--r-- | input-keys.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/input-keys.c b/input-keys.c index 2b30d4ba..483d410f 100644 --- a/input-keys.c +++ b/input-keys.c @@ -199,7 +199,7 @@ input_key(struct window_pane *wp, int key) /* Translate mouse and output. */ void -input_mouse(struct window_pane *wp, struct mouse_event *m) +input_mouse(struct window_pane *wp, struct session *s, struct mouse_event *m) { char buf[10]; size_t len; @@ -207,14 +207,14 @@ input_mouse(struct window_pane *wp, struct mouse_event *m) if (wp->screen->mode & ALL_MOUSE_MODES) { if (wp->screen->mode & MODE_MOUSE_UTF8) { len = xsnprintf(buf, sizeof buf, "\033[M"); - len += utf8_split2(m->b + 32, &buf[len]); + len += utf8_split2(m->xb + 32, &buf[len]); len += utf8_split2(m->x + 33, &buf[len]); len += utf8_split2(m->y + 33, &buf[len]); } else { - if (m->b > 223 || m->x >= 222 || m->y > 222) + if (m->xb > 223 || m->x >= 222 || m->y > 222) return; len = xsnprintf(buf, sizeof buf, "\033[M"); - buf[len++] = m->b + 32; + buf[len++] = m->xb + 32; buf[len++] = m->x + 33; buf[len++] = m->y + 33; } @@ -222,12 +222,12 @@ input_mouse(struct window_pane *wp, struct mouse_event *m) return; } - if ((m->b & 3) != 1 && + if ((m->xb & 3) != 1 && options_get_number(&wp->window->options, "mode-mouse") == 1) { if (window_pane_set_mode(wp, &window_copy_mode) == 0) { window_copy_init_from_pane(wp); if (wp->mode->mouse != NULL) - wp->mode->mouse(wp, NULL, m); + wp->mode->mouse(wp, s, m); } return; } |