Fix drag event reporting not specifying the current button.

xterm does this, so in the absence of a spec we copy xterm. Fixes #4925
This commit is contained in:
Kovid Goyal 2022-04-07 16:22:26 +05:30
parent 3ec93e0b4e
commit 838a85ee8b
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -69,7 +69,9 @@ static int
encode_mouse_event_impl(const MousePosition *mpos, int mouse_tracking_protocol, int button, MouseAction action, int mods) {
unsigned int cb = 0;
if (action == MOVE) {
cb = 3;
cb = encode_button(button);
if (cb == UINT_MAX) cb = 3;
cb += 32;
} else {
cb = encode_button(button);
if (cb == UINT_MAX) return 0;