diff options
| author | Eli Zaretskii | 2015-05-21 19:38:19 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2015-05-21 19:38:19 +0300 |
| commit | fc071bf7c6a300f52142b92cf99c5a0e63b3e235 (patch) | |
| tree | 7cd9f4c082103556de90ba6e07505d95195cf8be /src | |
| parent | a31ca4ef50efae51f9281be11cb6668789a57f08 (diff) | |
| download | emacs-fc071bf7c6a300f52142b92cf99c5a0e63b3e235.tar.gz emacs-fc071bf7c6a300f52142b92cf99c5a0e63b3e235.zip | |
Fix a minor problem with mouse-face on mode line
* src/xdisp.c (note_mode_line_or_margin_highlight): Reset the
mouse face also if the mouse pointer hovers above mode-line glyphs
that don't come from any Lisp string. (Bug#20620)
Diffstat (limited to 'src')
| -rw-r--r-- | src/xdisp.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/xdisp.c b/src/xdisp.c index 8123719ed48..87f110e667d 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -29159,6 +29159,7 @@ note_mode_line_or_margin_highlight (Lisp_Object window, int x, int y, | |||
| 29159 | } | 29159 | } |
| 29160 | 29160 | ||
| 29161 | /* Change the mouse face according to what is under X/Y. */ | 29161 | /* Change the mouse face according to what is under X/Y. */ |
| 29162 | bool mouse_face_shown = false; | ||
| 29162 | if (STRINGP (string)) | 29163 | if (STRINGP (string)) |
| 29163 | { | 29164 | { |
| 29164 | mouse_face = Fget_text_property (pos, Qmouse_face, string); | 29165 | mouse_face = Fget_text_property (pos, Qmouse_face, string); |
| @@ -29281,13 +29282,18 @@ note_mode_line_or_margin_highlight (Lisp_Object window, int x, int y, | |||
| 29281 | glyph->face_id, | 29282 | glyph->face_id, |
| 29282 | true); | 29283 | true); |
| 29283 | show_mouse_face (hlinfo, DRAW_MOUSE_FACE); | 29284 | show_mouse_face (hlinfo, DRAW_MOUSE_FACE); |
| 29285 | mouse_face_shown = true; | ||
| 29284 | 29286 | ||
| 29285 | if (NILP (pointer)) | 29287 | if (NILP (pointer)) |
| 29286 | pointer = Qhand; | 29288 | pointer = Qhand; |
| 29287 | } | 29289 | } |
| 29288 | else if ((area == ON_MODE_LINE) || (area == ON_HEADER_LINE)) | ||
| 29289 | clear_mouse_face (hlinfo); | ||
| 29290 | } | 29290 | } |
| 29291 | |||
| 29292 | /* If mouse-face doesn't need to be shown, clear any existing | ||
| 29293 | mouse-face. */ | ||
| 29294 | if ((area == ON_MODE_LINE || area == ON_HEADER_LINE) && !mouse_face_shown) | ||
| 29295 | clear_mouse_face (hlinfo); | ||
| 29296 | |||
| 29291 | #ifdef HAVE_WINDOW_SYSTEM | 29297 | #ifdef HAVE_WINDOW_SYSTEM |
| 29292 | if (FRAME_WINDOW_P (f)) | 29298 | if (FRAME_WINDOW_P (f)) |
| 29293 | define_frame_cursor1 (f, cursor, pointer); | 29299 | define_frame_cursor1 (f, cursor, pointer); |