summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGerd Moellmann <gerd@gnu.org>2001-08-28 14:34:17 +0000
committerGerd Moellmann <gerd@gnu.org>2001-08-28 14:34:17 +0000
commit7b0870b2631fa51b5c22b10b69af0ae1306c5954 (patch)
tree0ac1795faa1eafcad55ed1a50d129745c3665434
parent0f76ca04ee0bb58445a1bc86eaa519753d5b29f1 (diff)
downloademacs-7b0870b2631fa51b5c22b10b69af0ae1306c5954.tar.gz
(x_set_glyph_string_background_width): Set the glyph
strings background width so that multi-line mouse-face is drawn to the right edge of the window. (show_mouse_face): Set the row's mouse_face_p flag after drawing glyphs.
-rw-r--r--src/ChangeLog6
-rw-r--r--src/xterm.c14
2 files changed, 14 insertions, 6 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index c4dc94cc701..eb8694739d7 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,11 @@
2001-08-28 Gerd Moellmann <gerd@gnu.org>
+ * xterm.c (x_set_glyph_string_background_width): Set the glyph
+ string's background width so that multi-line mouse-face is drawn
+ to the right edge of the window.
+ (show_mouse_face): Set the row's mouse_face_p flag after drawing
+ glyphs.
+
* dispnew.c (direct_output_for_insert): Set updated_area
before insering/writing glyphs.
diff --git a/src/xterm.c b/src/xterm.c
index b472bde7656..66e5c5cfd08 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -4836,12 +4836,14 @@ x_set_glyph_string_background_width (s, start, last_x)
struct face *default_face = FACE_FROM_ID (s->f, DEFAULT_FACE_ID);
if (start == s->row->used[s->area]
- && s->hl == DRAW_NORMAL_TEXT
&& s->area == TEXT_AREA
- && (s->row->fill_line_p
- || s->face->background != default_face->background
- || s->face->stipple != default_face->stipple))
- s->extends_to_end_of_line_p = 1;
+ && ((s->hl == DRAW_NORMAL_TEXT
+ && (s->row->fill_line_p
+ || s->face->background != default_face->background
+ || s->face->stipple != default_face->stipple
+ || s->row->mouse_face_p))
+ || s->hl == DRAW_MOUSE_FACE))
+ s->extends_to_end_of_line_p = 1;
/* If S extends its face to the end of the line, set its
background_width to the distance to the right edge of the drawing
@@ -7696,9 +7698,9 @@ show_mouse_face (dpyinfo, draw)
if (end_hpos > start_hpos)
{
- row->mouse_face_p = draw == DRAW_MOUSE_FACE || DRAW_IMAGE_RAISED;
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 || DRAW_IMAGE_RAISED;
}
}