Mouse reporting: Fix drag release event outside the window not being reported in legacy mouse reporting modes

Fixes #7244
This commit is contained in:
Kovid Goyal
2024-03-21 20:32:58 +05:30
parent 11882aef2d
commit 1f149861f9
2 changed files with 3 additions and 1 deletions

View File

@@ -52,6 +52,8 @@ Detailed list of changes
- A new option :opt:`terminfo_type` to allow passing the terminfo database embedded into the :envvar:`TERMINFO` env var directly instead of via a file
- Mouse reporting: Fix drag release event outside the window not being reported in legacy mouse reporting modes (:iss:`7244`)
0.33.1 [2024-03-21]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

View File

@@ -821,7 +821,7 @@ mouse_event(const int button, int modifiers, int action) {
}
} else if (action == GLFW_RELEASE && button == GLFW_MOUSE_BUTTON_LEFT) {
w = window_for_id(global_state.tracked_drag_in_window);
if (w && w->render_data.screen->modes.mouse_tracking_mode >= MOTION_MODE && w->render_data.screen->modes.mouse_tracking_protocol == SGR_PIXEL_PROTOCOL) {
if (w && w->render_data.screen->modes.mouse_tracking_mode >= BUTTON_MODE && w->render_data.screen->modes.mouse_tracking_protocol >= SGR_PROTOCOL) {
global_state.tracked_drag_in_window = 0;
clamp_to_window = true;
Tab *t = global_state.callback_os_window->tabs + global_state.callback_os_window->active_tab;