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:
parent
6941884221
commit
55b21b741e
2 changed files with 3 additions and 1 deletions
|
|
@ -47,6 +47,8 @@ Detailed list of changes
|
|||
|
||||
- Bash integration: Fix the value of :opt:`shell_integration` not taking effect if the integration script is sourced in bashrc (:pull:`4964`)
|
||||
|
||||
- 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 (:iss:`4992`)
|
||||
|
||||
|
||||
0.25.0 [2022-04-11]
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
|
|
|||
|
|
@ -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); }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue