mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-16 05:24:20 +02:00
Fix a regression in the previous release that caused mouse move events to be incorrectly reported as drag events even when a button is not pressed
Fixes #4992 Will need to investigate a different fix for #4925. xterm does report the button press that caused the drag to start with move events, so we will have to track that to match its behavior as glfw does not track it for us.
This commit is contained in:
@@ -360,7 +360,7 @@ HANDLER(handle_move_event) {
|
||||
handle_mouse_movement_in_kitty(w, button, mouse_cell_changed | cell_half_changed);
|
||||
} else {
|
||||
if (!mouse_cell_changed && screen->modes.mouse_tracking_protocol != SGR_PIXEL_PROTOCOL) return;
|
||||
int sz = encode_mouse_button(w, MAX(0, button), button >=0 ? DRAG : MOVE, modifiers);
|
||||
int sz = encode_mouse_button(w, button, button >=0 ? DRAG : MOVE, modifiers);
|
||||
if (sz > 0) { mouse_event_buf[sz] = 0; write_escape_code_to_child(screen, CSI, mouse_event_buf); }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user