summaryrefslogtreecommitdiff
path: root/src/xterm.c
diff options
context:
space:
mode:
authorGerd Moellmann <gerd@gnu.org>2000-07-11 19:58:43 +0000
committerGerd Moellmann <gerd@gnu.org>2000-07-11 19:58:43 +0000
commit64f26cf542f0c0231461c3a80af4cc812dfb1edd (patch)
tree7c0a121bfdd36bf9c0b01122af3ea88a87eb3698 /src/xterm.c
parente4e0bee93c3aa63184bd566641f6411248005843 (diff)
downloademacs-64f26cf542f0c0231461c3a80af4cc812dfb1edd.tar.gz
(x_update_window_begin): No need to turn off the mouse
highlight here. (show_mouse_face): Set the mouse_face_p flag of glyph rows depending on whether they contain glyphs highlighted in mouse-face.
Diffstat (limited to 'src/xterm.c')
-rw-r--r--src/xterm.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/xterm.c b/src/xterm.c
index c2f3a49c696..0fe950534e3 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -598,6 +598,13 @@ x_update_window_begin (w)
if (FRAME_GARBAGED_P (f))
display_info->mouse_face_window = Qnil;
+#if 0 /* Rows in a current matrix containing glyphs in mouse-face have
+ their mouse_face_p flag set, which means that they are always
+ unequal to rows in a desired matrix which never have that
+ flag set. So, rows containing mouse-face glyphs are never
+ scrolled, and we don't have to switch the mouse highlight off
+ here to prevent it from being scrolled. */
+
/* Can we tell that this update does not affect the window
where the mouse highlight is? If so, no need to turn off.
Likewise, don't do anything if the frame is garbaged;
@@ -615,6 +622,7 @@ x_update_window_begin (w)
if (i < w->desired_matrix->nrows)
clear_mouse_face (display_info);
}
+#endif /* 0 */
}
UNBLOCK_INPUT;
@@ -7024,8 +7032,11 @@ show_mouse_face (dpyinfo, draw)
}
if (end_hpos > start_hpos)
- x_draw_glyphs (w, start_x, row, TEXT_AREA,
- start_hpos, end_hpos, draw, NULL, NULL, 0);
+ {
+ row->mouse_face_p = draw == DRAW_MOUSE_FACE;
+ x_draw_glyphs (w, start_x, row, TEXT_AREA,
+ start_hpos, end_hpos, draw, NULL, NULL, 0);
+ }
}
/* If we turned the cursor off, turn it back on. */