From: Po Lu Date: Sat, 30 Apr 2022 02:34:18 +0000 (+0000) Subject: Prevent cursors from being set on tooltip frames on Haiku X-Git-Tag: emacs-29.0.90~1931^2~207 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=a33bf0114920a67926761ec2f51c040265b8dfd1;p=emacs.git Prevent cursors from being set on tooltip frames on Haiku * src/haikuterm.c (haiku_show_hourglass, haiku_hide_hourglass) (haiku_define_frame_cursor, haiku_toggle_invisible_pointer): Ignore tooltip frames. Otherwise, the cursor changes every time a tooltip is mapped. --- diff --git a/src/haikuterm.c b/src/haikuterm.c index 393d359b66e..1dbe3598ffd 100644 --- a/src/haikuterm.c +++ b/src/haikuterm.c @@ -2005,7 +2005,8 @@ haiku_draw_window_cursor (struct window *w, static void haiku_show_hourglass (struct frame *f) { - if (FRAME_OUTPUT_DATA (f)->hourglass_p) + if (FRAME_TOOLTIP_P (f) + || FRAME_OUTPUT_DATA (f)->hourglass_p) return; block_input (); @@ -2020,7 +2021,8 @@ haiku_show_hourglass (struct frame *f) static void haiku_hide_hourglass (struct frame *f) { - if (!FRAME_OUTPUT_DATA (f)->hourglass_p) + if (FRAME_TOOLTIP_P (f) + || !FRAME_OUTPUT_DATA (f)->hourglass_p) return; block_input (); @@ -2659,8 +2661,9 @@ haiku_flush (struct frame *f) static void haiku_define_frame_cursor (struct frame *f, Emacs_Cursor cursor) { - if (f->tooltip) + if (FRAME_TOOLTIP_P (f)) return; + block_input (); if (!f->pointer_invisible && FRAME_HAIKU_VIEW (f) && !FRAME_OUTPUT_DATA (f)->hourglass_p) @@ -3852,12 +3855,12 @@ haiku_toggle_invisible_pointer (struct frame *f, bool invisible_p) { void *view = FRAME_HAIKU_VIEW (f); - if (view) + if (view && !FRAME_TOOLTIP_P (f)) { block_input (); - BView_set_view_cursor (view, invisible_p ? - FRAME_OUTPUT_DATA (f)->no_cursor : - FRAME_OUTPUT_DATA (f)->current_cursor); + BView_set_view_cursor (view, (invisible_p + ? FRAME_OUTPUT_DATA (f)->no_cursor + : FRAME_OUTPUT_DATA (f)->current_cursor)); f->pointer_invisible = invisible_p; unblock_input (); }