The focus_follows_mouse option now also works across top-level kitty OS windows

Fixes #772
This commit is contained in:
Kovid Goyal
2018-07-30 21:26:20 +05:30
parent 78def6e6bf
commit 9af3081f45
8 changed files with 48 additions and 8 deletions

View File

@@ -451,6 +451,13 @@ focus_in_event() {
if (w && w->render_data.screen) screen_mark_url(w->render_data.screen, 0, 0, 0, 0);
}
void
enter_event() {
if (OPT(focus_follows_mouse) && !global_state.callback_os_window->is_focused) {
focus_os_window(global_state.callback_os_window, false);
}
}
void
mouse_event(int button, int modifiers) {
MouseShape old_cursor = mouse_cursor_shape;