aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPo Lu2022-01-17 04:52:00 +0000
committerPo Lu2022-01-17 04:53:42 +0000
commitace6a88285a281b1d5590ab64d83be962419d976 (patch)
tree6dfa52d0c84a7749e29be688b97401c41aa764d6 /src
parent84ebb165771f2e0b4218ffa77916953681f9901e (diff)
downloademacs-ace6a88285a281b1d5590ab64d83be962419d976.tar.gz
emacs-ace6a88285a281b1d5590ab64d83be962419d976.zip
Really eliminate tooltip flicker on Haiku
* src/haikufns.c (tip_frame): Make non-static. * src/haikuterm.c (haiku_read_socket): Ignore motion events that didn't actually move when a tip frame is visible. * src/haikuterm.h (tip_frame): Declare.
Diffstat (limited to 'src')
-rw-r--r--src/haikufns.c2
-rw-r--r--src/haikuterm.c10
-rw-r--r--src/haikuterm.h2
3 files changed, 13 insertions, 1 deletions
diff --git a/src/haikufns.c b/src/haikufns.c
index 52bb13bc89b..2edf883b9cb 100644
--- a/src/haikufns.c
+++ b/src/haikufns.c
@@ -45,7 +45,7 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */
45#define BLUE_FROM_ULONG(color) ((color) & 0xff) 45#define BLUE_FROM_ULONG(color) ((color) & 0xff)
46 46
47/* The frame of the currently visible tooltip. */ 47/* The frame of the currently visible tooltip. */
48static Lisp_Object tip_frame; 48Lisp_Object tip_frame;
49 49
50/* The window-system window corresponding to the frame of the 50/* The window-system window corresponding to the frame of the
51 currently visible tooltip. */ 51 currently visible tooltip. */
diff --git a/src/haikuterm.c b/src/haikuterm.c
index 05f9788f184..cc4c3961ec4 100644
--- a/src/haikuterm.c
+++ b/src/haikuterm.c
@@ -2786,6 +2786,16 @@ haiku_read_socket (struct terminal *terminal, struct input_event *hold_quit)
2786 struct haiku_display_info *dpyinfo = FRAME_DISPLAY_INFO (f); 2786 struct haiku_display_info *dpyinfo = FRAME_DISPLAY_INFO (f);
2787 struct haiku_rect r = dpyinfo->last_mouse_glyph; 2787 struct haiku_rect r = dpyinfo->last_mouse_glyph;
2788 2788
2789 /* For an unknown reason Haiku sends phantom motion events when a
2790 tooltip frame is visible. FIXME */
2791 if (FRAMEP (tip_frame)
2792 && FRAME_LIVE_P (XFRAME (tip_frame))
2793 && FRAME_VISIBLE_P (XFRAME (tip_frame))
2794 && f == dpyinfo->last_mouse_motion_frame
2795 && b->x == dpyinfo->last_mouse_motion_x
2796 && b->y == dpyinfo->last_mouse_motion_y)
2797 continue;
2798
2789 dpyinfo->last_mouse_motion_x = b->x; 2799 dpyinfo->last_mouse_motion_x = b->x;
2790 dpyinfo->last_mouse_motion_y = b->y; 2800 dpyinfo->last_mouse_motion_y = b->y;
2791 dpyinfo->last_mouse_motion_frame = f; 2801 dpyinfo->last_mouse_motion_frame = f;
diff --git a/src/haikuterm.h b/src/haikuterm.h
index 3e39403ab4d..de302883e48 100644
--- a/src/haikuterm.h
+++ b/src/haikuterm.h
@@ -178,6 +178,8 @@ struct x_output
178extern struct haiku_display_info *x_display_list; 178extern struct haiku_display_info *x_display_list;
179extern struct font_driver const haikufont_driver; 179extern struct font_driver const haikufont_driver;
180 180
181extern Lisp_Object tip_frame;
182
181struct scroll_bar 183struct scroll_bar
182{ 184{
183 /* These fields are shared by all vectors. */ 185 /* These fields are shared by all vectors. */