aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPo Lu2022-01-01 06:16:59 +0000
committerPo Lu2022-01-01 06:17:51 +0000
commit376d6cf36a073cf724f9dd2be58da813bc40ecf5 (patch)
treea95230e442ef8bd1873ea8ca585749f52fc48179
parente7f25b95f433a74f11012c4c1a261b1052407c5c (diff)
downloademacs-376d6cf36a073cf724f9dd2be58da813bc40ecf5.tar.gz
emacs-376d6cf36a073cf724f9dd2be58da813bc40ecf5.zip
Implement numeric values of `mouse-highlight' on Haiku
* src/haikuterm.c (haiku_read_socket): Clear mouse face on keyboard input if `mouse-highlight' is a fixnum.
-rw-r--r--src/haikuterm.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/haikuterm.c b/src/haikuterm.c
index 574bf40f7b6..676c2e21486 100644
--- a/src/haikuterm.c
+++ b/src/haikuterm.c
@@ -2693,11 +2693,24 @@ haiku_read_socket (struct terminal *terminal, struct input_event *hold_quit)
2693 case KEY_DOWN: 2693 case KEY_DOWN:
2694 { 2694 {
2695 struct haiku_key_event *b = buf; 2695 struct haiku_key_event *b = buf;
2696 Mouse_HLInfo *hlinfo = &x_display_list->mouse_highlight;
2696 struct frame *f = haiku_window_to_frame (b->window); 2697 struct frame *f = haiku_window_to_frame (b->window);
2697 int non_ascii_p; 2698 int non_ascii_p;
2698 if (!f) 2699 if (!f)
2699 continue; 2700 continue;
2700 2701
2702 /* If mouse-highlight is an integer, input clears out
2703 mouse highlighting. */
2704 if (!hlinfo->mouse_face_hidden && FIXNUMP (Vmouse_highlight)
2705 && (f == 0
2706 || !EQ (f->tool_bar_window, hlinfo->mouse_face_window)
2707 || !EQ (f->tab_bar_window, hlinfo->mouse_face_window)))
2708 {
2709 clear_mouse_face (hlinfo);
2710 hlinfo->mouse_face_hidden = true;
2711 need_flush = 1;
2712 }
2713
2701 inev.code = b->unraw_mb_char; 2714 inev.code = b->unraw_mb_char;
2702 2715
2703 BMapKey (b->kc, &non_ascii_p, &inev.code); 2716 BMapKey (b->kc, &non_ascii_p, &inev.code);
@@ -2738,6 +2751,7 @@ haiku_read_socket (struct terminal *terminal, struct input_event *hold_quit)
2738 { 2751 {
2739 struct haiku_mouse_motion_event *b = buf; 2752 struct haiku_mouse_motion_event *b = buf;
2740 struct frame *f = haiku_window_to_frame (b->window); 2753 struct frame *f = haiku_window_to_frame (b->window);
2754 Mouse_HLInfo *hlinfo = &x_display_list->mouse_highlight;
2741 2755
2742 if (!f) 2756 if (!f)
2743 continue; 2757 continue;
@@ -2748,6 +2762,13 @@ haiku_read_socket (struct terminal *terminal, struct input_event *hold_quit)
2748 x_display_list->last_mouse_movement_time = time (NULL); 2762 x_display_list->last_mouse_movement_time = time (NULL);
2749 button_or_motion_p = 1; 2763 button_or_motion_p = 1;
2750 2764
2765 if (hlinfo->mouse_face_hidden)
2766 {
2767 hlinfo->mouse_face_hidden = false;
2768 clear_mouse_face (hlinfo);
2769 need_flush = 1;
2770 }
2771
2751 if (b->just_exited_p) 2772 if (b->just_exited_p)
2752 { 2773 {
2753 Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (f); 2774 Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (f);