=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/tty-keys.c,v retrieving revision 1.154 retrieving revision 1.155 diff -c -r1.154 -r1.155 *** src/usr.bin/tmux/tty-keys.c 2022/03/08 12:01:19 1.154 --- src/usr.bin/tmux/tty-keys.c 2022/05/30 13:02:55 1.155 *************** *** 1,4 **** ! /* $OpenBSD: tty-keys.c,v 1.154 2022/03/08 12:01:19 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott --- 1,4 ---- ! /* $OpenBSD: tty-keys.c,v 1.155 2022/05/30 13:02:55 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott *************** *** 1061,1077 **** log_debug("%s: mouse input: %.*s", c->name, (int)*size, buf); /* Check and return the mouse input. */ ! if (b < 32) return (-1); ! b -= 32; ! if (x >= 33) ! x -= 33; ! else ! x = 256 - x; ! if (y >= 33) ! y -= 33; ! else ! y = 256 - y; } else if (buf[2] == '<') { /* Read the three inputs. */ *size = 3; --- 1061,1073 ---- log_debug("%s: mouse input: %.*s", c->name, (int)*size, buf); /* Check and return the mouse input. */ ! if (b < MOUSE_PARAM_BTN_OFF || ! x < MOUSE_PARAM_POS_OFF || ! y < MOUSE_PARAM_POS_OFF) return (-1); ! b -= MOUSE_PARAM_BTN_OFF; ! x -= MOUSE_PARAM_POS_OFF; ! y -= MOUSE_PARAM_POS_OFF; } else if (buf[2] == '<') { /* Read the three inputs. */ *size = 3;