version 1.154, 2022/03/08 12:01:19 |
version 1.155, 2022/05/30 13:02:55 |
|
|
log_debug("%s: mouse input: %.*s", c->name, (int)*size, buf); |
log_debug("%s: mouse input: %.*s", c->name, (int)*size, buf); |
|
|
/* Check and return the mouse input. */ |
/* Check and return the mouse input. */ |
if (b < 32) |
if (b < MOUSE_PARAM_BTN_OFF || |
|
x < MOUSE_PARAM_POS_OFF || |
|
y < MOUSE_PARAM_POS_OFF) |
return (-1); |
return (-1); |
b -= 32; |
b -= MOUSE_PARAM_BTN_OFF; |
if (x >= 33) |
x -= MOUSE_PARAM_POS_OFF; |
x -= 33; |
y -= MOUSE_PARAM_POS_OFF; |
else |
|
x = 256 - x; |
|
if (y >= 33) |
|
y -= 33; |
|
else |
|
y = 256 - y; |
|
} else if (buf[2] == '<') { |
} else if (buf[2] == '<') { |
/* Read the three inputs. */ |
/* Read the three inputs. */ |
*size = 3; |
*size = 3; |