From 59ff15e3502e44d7ae7ea23cd882fc18a766d989 Mon Sep 17 00:00:00 2001 From: Po Lu Date: Wed, 9 Feb 2022 02:10:36 +0000 Subject: [PATCH] Make sure the cursor can't move on top of a tooltip on Haiku * src/haikuterm.c (haiku_read_socket): Work around leave notification events not being sent on tooltip frames. --- src/haikuterm.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/haikuterm.c b/src/haikuterm.c index 0c7e08585e7..117d8df2e56 100644 --- a/src/haikuterm.c +++ b/src/haikuterm.c @@ -2730,9 +2730,21 @@ haiku_read_socket (struct terminal *terminal, struct input_event *hold_quit) struct frame *f = haiku_window_to_frame (b->window); Mouse_HLInfo *hlinfo = &x_display_list->mouse_highlight; - if (!f || FRAME_TOOLTIP_P (f)) + if (!f) continue; + if (FRAME_TOOLTIP_P (f)) + { + /* Dismiss the tooltip if the mouse moves onto a + tooltip frame. FIXME: for some reason we don't get + leave notification events for this. */ + + if (any_help_event_p) + do_help = -1; + + break; + } + Lisp_Object frame; XSETFRAME (frame, f); -- 2.39.5