mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-28 03:01:57 +02:00
Fix hovered hyperlink not being cleared when mouse moves from one kitty window to another
This commit is contained in:
@@ -902,6 +902,14 @@ mouse_event(const int button, int modifiers, int action) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
w = window_for_event(&window_idx, &in_tab_bar);
|
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) {
|
if (in_tab_bar) {
|
||||||
mouse_cursor_shape = POINTER_POINTER;
|
mouse_cursor_shape = POINTER_POINTER;
|
||||||
handle_tab_bar_mouse(button, modifiers, action);
|
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
|
static bool
|
||||||
has_hyperlink_target(OSWindow *os_window, Window *w, Screen *screen) {
|
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
|
static void
|
||||||
|
|||||||
Reference in New Issue
Block a user