This commit is contained in:
Kovid Goyal 2022-04-07 16:24:21 +05:30
parent 838a85ee8b
commit e7b216ba68
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -67,13 +67,11 @@ static char mouse_event_buf[64];
static int static int
encode_mouse_event_impl(const MousePosition *mpos, int mouse_tracking_protocol, int button, MouseAction action, int mods) { encode_mouse_event_impl(const MousePosition *mpos, int mouse_tracking_protocol, int button, MouseAction action, int mods) {
unsigned int cb = 0; unsigned int cb = encode_button(button);
if (action == MOVE) { if (action == MOVE) {
cb = encode_button(button);
if (cb == UINT_MAX) cb = 3; if (cb == UINT_MAX) cb = 3;
cb += 32; cb += 32;
} else { } else {
cb = encode_button(button);
if (cb == UINT_MAX) return 0; if (cb == UINT_MAX) return 0;
} }
if (action == DRAG || action == MOVE) cb |= MOTION_INDICATOR; if (action == DRAG || action == MOVE) cb |= MOTION_INDICATOR;