Nicer function name

This commit is contained in:
Kovid Goyal
2025-12-06 10:12:23 +05:30
parent 244002a9eb
commit 1b8d780c5a
2 changed files with 3 additions and 3 deletions

View File

@@ -2345,7 +2345,7 @@ class Boss:
window.set_logo(f'{path}-128{ext}', position='bottom-right', alpha=0.25)
window.allow_remote_control = True
def switch_focus_to(self, window_id: int) -> None:
def switch_focus_to_in_active_tab(self, window_id: int) -> None:
tab = self.active_tab
if tab:
tab.set_active_window(window_id)

View File

@@ -628,7 +628,7 @@ HANDLER(handle_move_event) {
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, "K", t->windows[window_idx].id);
call_boss(switch_focus_to_in_active_tab, "K", t->windows[window_idx].id);
}
}
bool mouse_cell_changed = false;
@@ -821,7 +821,7 @@ HANDLER(handle_button_event) {
if (handle_scrollbar_mouse(w, button, is_release ? RELEASE : PRESS, modifiers)) return;
if (window_idx != t->active_window && !is_release) {
call_boss(switch_focus_to, "K", t->windows[window_idx].id);
call_boss(switch_focus_to_in_active_tab, "K", t->windows[window_idx].id);
}
Screen *screen = w->render_data.screen;
if (!screen) return;