From 9ef6111b7cab7e28e74c0763696a38b34285dc4f Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Thu, 6 Jun 2013 19:35:31 +0300 Subject: [PATCH] Improve the fix for bug #14558. src/xdisp.c (note_mouse_highlight): When mouse-highlight is off, still need to set the mouse pointer shape and activate help-echo. --- src/ChangeLog | 6 ++++++ src/xdisp.c | 18 ++++++++++++------ 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 11aaef4d2e8..3b65ff105e9 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2013-06-06 Eli Zaretskii + + * xdisp.c (note_mouse_highlight): When mouse-highlight is off, + still need to set the mouse pointer shape and activate help-echo. + (Bug#14558) + 2013-06-06 Paul Eggert A few porting etc. fixes for the new file monitor code. diff --git a/src/xdisp.c b/src/xdisp.c index 17001c81b53..6e391350816 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -27554,8 +27554,10 @@ note_mode_line_or_margin_highlight (Lisp_Object window, int x, int y, /* EXPORT: Take proper action when the mouse has moved to position X, Y on - frame F as regards highlighting characters that have mouse-face - properties. Also de-highlighting chars where the mouse was before. + frame F with regards to highlighting portions of display that have + mouse-face properties. Also de-highlight portions of display where + the mouse was before, set the mouse pointer shape as appropriate + for the mouse coordinates, and activate help echo (tooltips). X and Y can be negative or out of range. */ void @@ -27665,8 +27667,7 @@ note_mouse_highlight (struct frame *f, int x, int y) #ifdef HAVE_WINDOW_SYSTEM /* Look for :pointer property on image. */ - if (!NILP (Vmouse_highlight) - && glyph != NULL && glyph->type == IMAGE_GLYPH) + if (glyph != NULL && glyph->type == IMAGE_GLYPH) { struct image *img = IMAGE_FROM_ID (f, glyph->u.img_id); if (img != NULL && IMAGEP (img->spec)) @@ -27709,8 +27710,7 @@ note_mouse_highlight (struct frame *f, int x, int y) #endif /* HAVE_WINDOW_SYSTEM */ /* Clear mouse face if X/Y not over text. */ - if (NILP (Vmouse_highlight) - || glyph == NULL + if (glyph == NULL || area != TEXT_AREA || !MATRIX_ROW_DISPLAYS_TEXT_P (MATRIX_ROW (w->current_matrix, vpos)) /* Glyph's OBJECT is an integer for glyphs inserted by the @@ -27773,6 +27773,12 @@ note_mouse_highlight (struct frame *f, int x, int y) else noverlays = 0; + if (NILP (Vmouse_highlight)) + { + clear_mouse_face (hlinfo); + goto check_help_echo; + } + same_region = coords_in_mouse_face_p (w, hpos, vpos); if (same_region) -- 2.39.2