aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGerd Moellmann2001-03-06 15:30:15 +0000
committerGerd Moellmann2001-03-06 15:30:15 +0000
commit0a61c6670121b9493e39ff93c36fe96f7c9aba8e (patch)
tree64711c4ace564a2186cdefe726fb647ee61055f7 /src
parent59affd2f8b2ffc7524c1ce6afda518e61ec275ca (diff)
downloademacs-0a61c6670121b9493e39ff93c36fe96f7c9aba8e.tar.gz
emacs-0a61c6670121b9493e39ff93c36fe96f7c9aba8e.zip
(note_mouse_highlight): Call mouse_face_overlay_overlaps
to detect a case where we have to highlight a different region despite not having left the currently highlighted region. Set mouse_face_overlay in the x_display_info. (x_term_init): Initialze the x_display_info's mouse_face_overlay.
Diffstat (limited to 'src')
-rw-r--r--src/xterm.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/xterm.c b/src/xterm.c
index ef4801fbb18..fc09897de01 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -6723,7 +6723,7 @@ note_mouse_highlight (f, x, y)
6723 6723
6724 /* Check for mouse-face and help-echo. */ 6724 /* Check for mouse-face and help-echo. */
6725 { 6725 {
6726 Lisp_Object mouse_face, overlay, position; 6726 Lisp_Object mouse_face = Qnil, overlay, position;
6727 Lisp_Object *overlay_vec; 6727 Lisp_Object *overlay_vec;
6728 int len, noverlays; 6728 int len, noverlays;
6729 struct buffer *obuf; 6729 struct buffer *obuf;
@@ -6769,7 +6769,14 @@ note_mouse_highlight (f, x, y)
6769 || hpos >= dpyinfo->mouse_face_beg_col) 6769 || hpos >= dpyinfo->mouse_face_beg_col)
6770 && (vpos < dpyinfo->mouse_face_end_row 6770 && (vpos < dpyinfo->mouse_face_end_row
6771 || hpos < dpyinfo->mouse_face_end_col 6771 || hpos < dpyinfo->mouse_face_end_col
6772 || dpyinfo->mouse_face_past_end))) 6772 || dpyinfo->mouse_face_past_end))
6773 /* If there exists an overlay with mouse-face overlapping
6774 the one we are currently highlighting, we have to
6775 check if we enter the overlapping overlay, and then
6776 highlight only that. */
6777 || (OVERLAYP (dpyinfo->mouse_face_overlay)
6778 && mouse_face_overlay_overlaps (dpyinfo->mouse_face_overlay)))
6779
6773 { 6780 {
6774 /* Clear the display of the old active region, if any. */ 6781 /* Clear the display of the old active region, if any. */
6775 clear_mouse_face (dpyinfo); 6782 clear_mouse_face (dpyinfo);
@@ -6790,8 +6797,10 @@ note_mouse_highlight (f, x, y)
6790 if (NILP (overlay)) 6797 if (NILP (overlay))
6791 mouse_face = Fget_text_property (position, Qmouse_face, w->buffer); 6798 mouse_face = Fget_text_property (position, Qmouse_face, w->buffer);
6792 6799
6800 dpyinfo->mouse_face_overlay = overlay;
6801
6793 /* Handle the overlay case. */ 6802 /* Handle the overlay case. */
6794 if (! NILP (overlay)) 6803 if (!NILP (overlay))
6795 { 6804 {
6796 /* Find the range of text around this char that 6805 /* Find the range of text around this char that
6797 should be active. */ 6806 should be active. */
@@ -13779,6 +13788,7 @@ x_term_init (display_name, xrm_option, resource_name)
13779 dpyinfo->mouse_face_end_row = dpyinfo->mouse_face_end_col = -1; 13788 dpyinfo->mouse_face_end_row = dpyinfo->mouse_face_end_col = -1;
13780 dpyinfo->mouse_face_face_id = DEFAULT_FACE_ID; 13789 dpyinfo->mouse_face_face_id = DEFAULT_FACE_ID;
13781 dpyinfo->mouse_face_window = Qnil; 13790 dpyinfo->mouse_face_window = Qnil;
13791 dpyinfo->mouse_face_overlay = Qnil;
13782 dpyinfo->mouse_face_mouse_x = dpyinfo->mouse_face_mouse_y = 0; 13792 dpyinfo->mouse_face_mouse_x = dpyinfo->mouse_face_mouse_y = 0;
13783 dpyinfo->mouse_face_defer = 0; 13793 dpyinfo->mouse_face_defer = 0;
13784 dpyinfo->x_focus_frame = 0; 13794 dpyinfo->x_focus_frame = 0;