diff options
author | Thomas Adam <thomas@xteddy.org> | 2020-03-16 08:01:27 +0000 |
---|---|---|
committer | Thomas Adam <thomas@xteddy.org> | 2020-03-16 08:01:27 +0000 |
commit | f584fe1b006abf42aebd0b25b2ee8d082202c778 (patch) | |
tree | 48a427e950b1f4d187528fa5562b744da34b7869 /server-client.c | |
parent | 55aeaffb1a55019fec691d39a17632b4e7841fad (diff) | |
parent | d162ff48f3069c8371a40ddbcf987946dbddf953 (diff) | |
download | rtmux-f584fe1b006abf42aebd0b25b2ee8d082202c778.tar.gz rtmux-f584fe1b006abf42aebd0b25b2ee8d082202c778.tar.bz2 rtmux-f584fe1b006abf42aebd0b25b2ee8d082202c778.zip |
Merge branch 'obsd-master'
Diffstat (limited to 'server-client.c')
-rw-r--r-- | server-client.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/server-client.c b/server-client.c index b3f3ad3d..17a1c9de 100644 --- a/server-client.c +++ b/server-client.c @@ -417,6 +417,7 @@ server_client_check_mouse(struct client *c, struct key_event *event) struct winlink *wl; struct window_pane *wp; u_int x, y, b, sx, sy, px, py; + int ignore = 0; key_code key; struct timeval tv; struct style_range *sr; @@ -443,6 +444,7 @@ server_client_check_mouse(struct client *c, struct key_event *event) if (event->key == KEYC_DOUBLECLICK) { type = DOUBLE; x = m->x, y = m->y, b = m->b; + ignore = 1; log_debug("double-click at %u,%u", x, y); } else if ((m->sgr_type != ' ' && MOUSE_DRAG(m->sgr_b) && @@ -489,16 +491,17 @@ server_client_check_mouse(struct client *c, struct key_event *event) type = TRIPLE; x = m->x, y = m->y, b = m->b; log_debug("triple-click at %u,%u", x, y); + ignore = 1; goto have_event; } - } + } else + c->flags |= CLIENT_DOUBLECLICK; + add_timer: type = DOWN; x = m->x, y = m->y, b = m->b; log_debug("down at %u,%u", x, y); - c->flags |= CLIENT_DOUBLECLICK; - add_timer: if (KEYC_CLICK_TIMEOUT != 0) { memcpy(&c->click_event, m, sizeof c->click_event); c->click_button = m->b; @@ -517,6 +520,7 @@ have_event: /* Save the session. */ m->s = s->id; m->w = -1; + m->ignore = ignore; /* Is this on the status line? */ m->statusat = status_at_line(c); |