Fix incorrect encoding for mouse events in the UTF8_PROTOCOL
Fixes #167
This commit is contained in:
parent
dad9444db0
commit
4613e161ce
@ -66,8 +66,8 @@ encode_mouse_event(Window *w, int button, MouseAction action, int mods) {
|
|||||||
return snprintf(mouse_event_buf, sizeof(mouse_event_buf), "\033[%d;%d;%dM", cb, x, y);
|
return snprintf(mouse_event_buf, sizeof(mouse_event_buf), "\033[%d;%d;%dM", cb, x, y);
|
||||||
break;
|
break;
|
||||||
case UTF8_PROTOCOL:
|
case UTF8_PROTOCOL:
|
||||||
mouse_event_buf[0] = 033; mouse_event_buf[1] = '['; mouse_event_buf[2] = cb + 32;
|
mouse_event_buf[0] = 033; mouse_event_buf[1] = '['; mouse_event_buf[2] = 'M'; mouse_event_buf[3] = cb + 32;
|
||||||
unsigned int sz = 3;
|
unsigned int sz = 4;
|
||||||
sz += encode_utf8(x + 32, mouse_event_buf + sz);
|
sz += encode_utf8(x + 32, mouse_event_buf + sz);
|
||||||
sz += encode_utf8(y + 32, mouse_event_buf + sz);
|
sz += encode_utf8(y + 32, mouse_event_buf + sz);
|
||||||
return sz;
|
return sz;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user