Fix hovered hyperlink not being cleared when mouse moves from one kitty window to another
This commit is contained in:
parent
4fd84ac5ea
commit
2a26a4ddca
2 changed files with 9 additions and 1 deletions
|
|
@ -902,6 +902,14 @@ mouse_event(const int button, int modifiers, int action) {
|
|||
}
|
||||
}
|
||||
w = window_for_event(&window_idx, &in_tab_bar);
|
||||
if (global_state.mouse_hover_in_window) {
|
||||
Window *old_window = window_for_id(global_state.mouse_hover_in_window);
|
||||
if (old_window && old_window != w) {
|
||||
global_state.mouse_hover_in_window = 0;
|
||||
screen_mark_url(old_window->render_data.screen, 0, 0, 0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
if (in_tab_bar) {
|
||||
mouse_cursor_shape = POINTER_POINTER;
|
||||
handle_tab_bar_mouse(button, modifiers, action);
|
||||
|
|
|
|||
|
|
@ -814,7 +814,7 @@ render_a_bar(const UIRenderData *ui, WindowBarData *bar, PyObject *title, bool a
|
|||
|
||||
static bool
|
||||
has_hyperlink_target(OSWindow *os_window, Window *w, Screen *screen) {
|
||||
return OPT(show_hyperlink_targets) && screen->current_hyperlink_under_mouse.id && w && !is_mouse_hidden(os_window);
|
||||
return OPT(show_hyperlink_targets) && screen->current_hyperlink_under_mouse.id && w && !is_mouse_hidden(os_window) && global_state.mouse_hover_in_window == w->id;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
|||
Loading…
Reference in a new issue