aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGerd Moellmann2001-03-21 17:13:05 +0000
committerGerd Moellmann2001-03-21 17:13:05 +0000
commit140330dee9c827030ccdfcbf841939c2616fe93f (patch)
tree14cf8423c7416fc477edc43b57932f8614160720 /src
parent83c9cb8e067bbe333d0a9c11beabc986a4a33091 (diff)
downloademacs-140330dee9c827030ccdfcbf841939c2616fe93f.tar.gz
emacs-140330dee9c827030ccdfcbf841939c2616fe93f.zip
(x_update_window_end): Handle overwritten mouse face
also for tool bar windows. (show_mouse_face): Set the glyph row's mouse_face_p flag also when DRAW is DRAW_IMAGE_RAISED.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog7
-rw-r--r--src/xterm.c28
2 files changed, 20 insertions, 15 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 33246cf5d4b..2a5130151f5 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,10 @@
12001-03-21 Gerd Moellmann <gerd@gnu.org>
2
3 * xterm.c (x_update_window_end): Handle overwritten mouse face
4 also for tool bar windows.
5 (show_mouse_face): Set the glyph row's mouse_face_p flag also when
6 DRAW is DRAW_IMAGE_RAISED.
7
12001-03-20 Gerd Moellmann <gerd@gnu.org> 82001-03-20 Gerd Moellmann <gerd@gnu.org>
2 9
3 * print.c (syms_of_print): Doc fixes. 10 * print.c (syms_of_print): Doc fixes.
diff --git a/src/xterm.c b/src/xterm.c
index cd11231b122..0c7cac6d0d0 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -686,22 +686,12 @@ x_update_window_end (w, cursor_on_p, mouse_face_overwritten_p)
686 struct window *w; 686 struct window *w;
687 int cursor_on_p, mouse_face_overwritten_p; 687 int cursor_on_p, mouse_face_overwritten_p;
688{ 688{
689 struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (XFRAME (w->frame));
690
689 if (!w->pseudo_window_p) 691 if (!w->pseudo_window_p)
690 { 692 {
691 struct x_display_info *dpyinfo
692 = FRAME_X_DISPLAY_INFO (XFRAME (w->frame));
693
694 BLOCK_INPUT; 693 BLOCK_INPUT;
695 694
696 /* If a row with mouse-face was overwritten, arrange for
697 XTframe_up_to_date to redisplay the mouse highlight. */
698 if (mouse_face_overwritten_p)
699 {
700 dpyinfo->mouse_face_beg_row = dpyinfo->mouse_face_beg_col = -1;
701 dpyinfo->mouse_face_end_row = dpyinfo->mouse_face_end_col = -1;
702 dpyinfo->mouse_face_window = Qnil;
703 }
704
705 if (cursor_on_p) 695 if (cursor_on_p)
706 x_display_and_set_cursor (w, 1, output_cursor.hpos, 696 x_display_and_set_cursor (w, 1, output_cursor.hpos,
707 output_cursor.vpos, 697 output_cursor.vpos,
@@ -711,6 +701,15 @@ x_update_window_end (w, cursor_on_p, mouse_face_overwritten_p)
711 UNBLOCK_INPUT; 701 UNBLOCK_INPUT;
712 } 702 }
713 703
704 /* If a row with mouse-face was overwritten, arrange for
705 XTframe_up_to_date to redisplay the mouse highlight. */
706 if (mouse_face_overwritten_p)
707 {
708 dpyinfo->mouse_face_beg_row = dpyinfo->mouse_face_beg_col = -1;
709 dpyinfo->mouse_face_end_row = dpyinfo->mouse_face_end_col = -1;
710 dpyinfo->mouse_face_window = Qnil;
711 }
712
714 updated_window = NULL; 713 updated_window = NULL;
715} 714}
716 715
@@ -7154,7 +7153,7 @@ note_tool_bar_highlight (f, x, y)
7154 int i; 7153 int i;
7155 Lisp_Object enabled_p; 7154 Lisp_Object enabled_p;
7156 int prop_idx; 7155 int prop_idx;
7157 enum draw_glyphs_face draw = DRAW_IMAGE_RAISED; 7156 enum draw_glyphs_face draw;
7158 int mouse_down_p, rc; 7157 int mouse_down_p, rc;
7159 7158
7160 /* Function note_mouse_highlight is called with negative x(y 7159 /* Function note_mouse_highlight is called with negative x(y
@@ -7173,7 +7172,6 @@ note_tool_bar_highlight (f, x, y)
7173 return; 7172 return;
7174 } 7173 }
7175 else if (rc == 0) 7174 else if (rc == 0)
7176 /* On same tool-bar item as before. */
7177 goto set_help_echo; 7175 goto set_help_echo;
7178 7176
7179 clear_mouse_face (dpyinfo); 7177 clear_mouse_face (dpyinfo);
@@ -7481,7 +7479,7 @@ show_mouse_face (dpyinfo, draw)
7481 7479
7482 if (end_hpos > start_hpos) 7480 if (end_hpos > start_hpos)
7483 { 7481 {
7484 row->mouse_face_p = draw == DRAW_MOUSE_FACE; 7482 row->mouse_face_p = draw == DRAW_MOUSE_FACE || DRAW_IMAGE_RAISED;
7485 x_draw_glyphs (w, start_x, row, TEXT_AREA, 7483 x_draw_glyphs (w, start_x, row, TEXT_AREA,
7486 start_hpos, end_hpos, draw, NULL, NULL, 0); 7484 start_hpos, end_hpos, draw, NULL, NULL, 0);
7487 } 7485 }