mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-05-13 16:37:27 +00:00
Merge branch 'master' of https://github.com/lxcode/kitty
This commit is contained in:
commit
b198a45fe8
3 changed files with 15 additions and 7 deletions
|
|
@ -185,6 +185,8 @@ Detailed list of changes
|
|||
|
||||
- Allow optionally dragging URLs with the mouse, see :sc:`start_simple_selection` (:pull:`9804`)
|
||||
|
||||
- Change :opt:`focus_follows_mouse` to switch the active window only when the mouse crosses into a different window, instead of on every mouse motion event. Prevents accidental mouse bumps from undoing a keyboard-driven window switch.
|
||||
|
||||
- Fix thickness of diagonal lines in box drawing characters not the same as horizontal/vertical lines (:iss:`9719`)
|
||||
|
||||
- Graphics protocol: Fix crash when handling invalid PNG image with direct transmission
|
||||
|
|
|
|||
|
|
@ -196,6 +196,15 @@ set_currently_hovered_window(id_type window_id, int modifiers) {
|
|||
debug("Sent mouse leave event to window: %llu\n", left_window->id);
|
||||
}
|
||||
}
|
||||
if (window_id && OPT(focus_follows_mouse) && global_state.callback_os_window && global_state.callback_os_window->num_tabs) {
|
||||
Tab *t = global_state.callback_os_window->tabs + global_state.callback_os_window->active_tab;
|
||||
for (unsigned i = 0; i < t->num_windows; i++) {
|
||||
if (t->windows[i].id == window_id) {
|
||||
if (i != t->active_window) call_boss(switch_focus_to_in_active_tab, "K", window_id);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -654,12 +663,6 @@ HANDLER(handle_move_event) {
|
|||
|
||||
if (handle_scrollbar_mouse(w, -1, MOVE, modifiers)) return;
|
||||
|
||||
if (OPT(focus_follows_mouse)) {
|
||||
Tab *t = global_state.callback_os_window->tabs + global_state.callback_os_window->active_tab;
|
||||
if (window_idx != t->active_window) {
|
||||
call_boss(switch_focus_to_in_active_tab, "K", t->windows[window_idx].id);
|
||||
}
|
||||
}
|
||||
bool mouse_cell_changed = false;
|
||||
bool cell_half_changed = false;
|
||||
if (!set_mouse_position(w, &mouse_cell_changed, &cell_half_changed)) {
|
||||
|
|
|
|||
|
|
@ -857,7 +857,10 @@ fallback to 0.5.
|
|||
opt('focus_follows_mouse', 'no',
|
||||
option_type='to_bool', ctype='bool',
|
||||
long_text='''
|
||||
Set the active window to the window under the mouse when moving the mouse around.
|
||||
Set the active window to the window under the mouse when the mouse crosses
|
||||
into a different window. The active window does not change while the mouse
|
||||
moves around within a single window, so an accidental mouse bump will not
|
||||
undo a keyboard-driven window switch.
|
||||
On macOS, this will also cause the OS Window under the mouse to be focused automatically when the
|
||||
mouse enters it, as long as the kitty application is the active application.
|
||||
'''
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue