mirror of
https://github.com/kovidgoyal/kitty.git
synced 2024-11-13 12:09:35 +03:00
Do not focus window when mouse button is released
It is useless to focus a window on mouse button release. This behaviour makes this scenario possible: 1. Have at least two visible windows in the current tab. 2. Select text in a window with the left mouse button, dragging, and release the mouse button within the other window. The focus is changed to the other window. I believe this is unexpected. Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
This commit is contained in:
parent
96f5c66755
commit
fd2515da5c
@ -372,7 +372,7 @@ open_url(Window *w) {
|
||||
HANDLER(handle_button_event) {
|
||||
Tab *t = global_state.callback_os_window->tabs + global_state.callback_os_window->active_tab;
|
||||
bool is_release = !global_state.callback_os_window->mouse_button_pressed[button];
|
||||
if (window_idx != t->active_window) {
|
||||
if (window_idx != t->active_window && !is_release) {
|
||||
call_boss(switch_focus_to, "I", window_idx);
|
||||
}
|
||||
Screen *screen = w->render_data.screen;
|
||||
|
Loading…
Reference in New Issue
Block a user