=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/server-client.c,v retrieving revision 1.306 retrieving revision 1.307 diff -c -r1.306 -r1.307 *** src/usr.bin/tmux/server-client.c 2020/03/12 13:16:16 1.306 --- src/usr.bin/tmux/server-client.c 2020/03/16 06:12:42 1.307 *************** *** 1,4 **** ! /* $OpenBSD: server-client.c,v 1.306 2020/03/12 13:16:16 nicm Exp $ */ /* * Copyright (c) 2009 Nicholas Marriott --- 1,4 ---- ! /* $OpenBSD: server-client.c,v 1.307 2020/03/16 06:12:42 nicm Exp $ */ /* * Copyright (c) 2009 Nicholas Marriott *************** *** 419,424 **** --- 419,425 ---- 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; *************** *** 445,450 **** --- 446,452 ---- 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) && *************** *** 491,506 **** type = TRIPLE; x = m->x, y = m->y, b = m->b; log_debug("triple-click at %u,%u", x, y); goto have_event; } ! } 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; --- 493,509 ---- 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); if (KEYC_CLICK_TIMEOUT != 0) { memcpy(&c->click_event, m, sizeof c->click_event); c->click_button = m->b; *************** *** 519,524 **** --- 522,528 ---- /* 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);