diff options
| author | Masatake YAMATO | 2005-06-07 14:32:23 +0000 |
|---|---|---|
| committer | Masatake YAMATO | 2005-06-07 14:32:23 +0000 |
| commit | 602907aea1d3cbebcbe51ca1be18c043b5df3140 (patch) | |
| tree | 724b27a249add2ff1fb6f2a3adae6c27c74310e1 | |
| parent | db853b7a753cb38f082d26036a92b8982aeb5bf1 (diff) | |
| download | emacs-602907aea1d3cbebcbe51ca1be18c043b5df3140.tar.gz emacs-602907aea1d3cbebcbe51ca1be18c043b5df3140.zip | |
* xdisp.c (note_mode_line_or_margin_highlight): Check
the overlapping of re-rendering area to avoid flickering.
(note_mouse_highlight): Call clear_mouse_face if PART
is not ON_MODE_LINE nor ON_HEADER_LINE.
| -rw-r--r-- | src/ChangeLog | 7 | ||||
| -rw-r--r-- | src/xdisp.c | 34 |
2 files changed, 31 insertions, 10 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 0651dc206a0..003668db560 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,10 @@ | |||
| 1 | 2005-06-07 Masatake YAMATO <jet@gyve.org> | ||
| 2 | |||
| 3 | * xdisp.c (note_mode_line_or_margin_highlight): Check | ||
| 4 | the overlapping of re-rendering area to avoid flickering. | ||
| 5 | (note_mouse_highlight): Call clear_mouse_face if PART | ||
| 6 | is not ON_MODE_LINE nor ON_HEADER_LINE. | ||
| 7 | |||
| 1 | 2005-06-07 Kim F. Storm <storm@cua.dk> | 8 | 2005-06-07 Kim F. Storm <storm@cua.dk> |
| 2 | 9 | ||
| 3 | * process.c: Improve commentary for adaptive read buffering. | 10 | * process.c: Improve commentary for adaptive read buffering. |
diff --git a/src/xdisp.c b/src/xdisp.c index c1ea2a9389a..47421d13115 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -21491,10 +21491,8 @@ note_mode_line_or_margin_highlight (window, x, y, area) | |||
| 21491 | int total_pixel_width; | 21491 | int total_pixel_width; |
| 21492 | int ignore; | 21492 | int ignore; |
| 21493 | 21493 | ||
| 21494 | 21494 | int vpos, hpos; | |
| 21495 | if (clear_mouse_face (dpyinfo)) | 21495 | |
| 21496 | cursor = No_Cursor; | ||
| 21497 | |||
| 21498 | b = Fprevious_single_property_change (make_number (charpos + 1), | 21496 | b = Fprevious_single_property_change (make_number (charpos + 1), |
| 21499 | Qmouse_face, string, Qnil); | 21497 | Qmouse_face, string, Qnil); |
| 21500 | if (NILP (b)) | 21498 | if (NILP (b)) |
| @@ -21537,15 +21535,30 @@ note_mode_line_or_margin_highlight (window, x, y, area) | |||
| 21537 | for (tmp_glyph = glyph - gpos; tmp_glyph != glyph; tmp_glyph++) | 21535 | for (tmp_glyph = glyph - gpos; tmp_glyph != glyph; tmp_glyph++) |
| 21538 | total_pixel_width += tmp_glyph->pixel_width; | 21536 | total_pixel_width += tmp_glyph->pixel_width; |
| 21539 | 21537 | ||
| 21540 | dpyinfo->mouse_face_beg_col = (x - gpos); | 21538 | /* Pre calculation of re-rendering position */ |
| 21541 | dpyinfo->mouse_face_beg_row = (area == ON_MODE_LINE | 21539 | vpos = (x - gpos); |
| 21542 | ? (w->current_matrix)->nrows - 1 | 21540 | hpos = (area == ON_MODE_LINE |
| 21543 | : 0); | 21541 | ? (w->current_matrix)->nrows - 1 |
| 21542 | : 0); | ||
| 21543 | |||
| 21544 | /* If the re-rendering position is included in the last | ||
| 21545 | re-rendering area, we should do nothing. */ | ||
| 21546 | if ( window == dpyinfo->mouse_face_window | ||
| 21547 | && dpyinfo->mouse_face_beg_col <= vpos | ||
| 21548 | && vpos < dpyinfo->mouse_face_end_col | ||
| 21549 | && dpyinfo->mouse_face_beg_row == hpos ) | ||
| 21550 | return; | ||
| 21551 | |||
| 21552 | if (clear_mouse_face (dpyinfo)) | ||
| 21553 | cursor = No_Cursor; | ||
| 21554 | |||
| 21555 | dpyinfo->mouse_face_beg_col = vpos; | ||
| 21556 | dpyinfo->mouse_face_beg_row = hpos; | ||
| 21544 | 21557 | ||
| 21545 | dpyinfo->mouse_face_beg_x = original_x_pixel - (total_pixel_width + dx); | 21558 | dpyinfo->mouse_face_beg_x = original_x_pixel - (total_pixel_width + dx); |
| 21546 | dpyinfo->mouse_face_beg_y = 0; | 21559 | dpyinfo->mouse_face_beg_y = 0; |
| 21547 | 21560 | ||
| 21548 | dpyinfo->mouse_face_end_col = (x - gpos) + gseq_length; | 21561 | dpyinfo->mouse_face_end_col = vpos + gseq_length; |
| 21549 | dpyinfo->mouse_face_end_row = dpyinfo->mouse_face_beg_row; | 21562 | dpyinfo->mouse_face_end_row = dpyinfo->mouse_face_beg_row; |
| 21550 | 21563 | ||
| 21551 | dpyinfo->mouse_face_end_x = 0; | 21564 | dpyinfo->mouse_face_end_x = 0; |
| @@ -21617,7 +21630,8 @@ note_mouse_highlight (f, x, y) | |||
| 21617 | /* If we were displaying active text in another window, clear that. | 21630 | /* If we were displaying active text in another window, clear that. |
| 21618 | Also clear if we move out of text area in same window. */ | 21631 | Also clear if we move out of text area in same window. */ |
| 21619 | if (! EQ (window, dpyinfo->mouse_face_window) | 21632 | if (! EQ (window, dpyinfo->mouse_face_window) |
| 21620 | || (part != ON_TEXT && !NILP (dpyinfo->mouse_face_window))) | 21633 | || (part != ON_TEXT && part != ON_MODE_LINE && part != ON_HEADER_LINE |
| 21634 | && !NILP (dpyinfo->mouse_face_window))) | ||
| 21621 | clear_mouse_face (dpyinfo); | 21635 | clear_mouse_face (dpyinfo); |
| 21622 | 21636 | ||
| 21623 | /* Not on a window -> return. */ | 21637 | /* Not on a window -> return. */ |