changeset 25079:3a09aae52441

(x_get_glyph_string_clip_rect): Take internal border into account for full-width windows. Don't add scroll bar width to width of clip rect. (x_draw_glyph_string_box): Add 1 to right x of full width lines. (x_set_glyph_string_background_width): Add 1 to background width. (x_draw_glyphs): Take internal border into account for full-width lines.
author Gerd Moellmann <gerd@gnu.org>
date Mon, 26 Jul 1999 21:23:07 +0000
parents 6de9d21f8a24
children 46c21258f1ff
files src/xterm.c
diffstat 1 files changed, 13 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/src/xterm.c	Mon Jul 26 21:22:23 1999 +0000
+++ b/src/xterm.c	Mon Jul 26 21:23:07 1999 +0000
@@ -2364,17 +2364,22 @@
   if (s->row->full_width_p)
     {
       /* Draw full-width.  X coordinates are relative to S->w->left.  */
-      r->x = WINDOW_LEFT_MARGIN (s->w) * CANON_X_UNIT (s->f);
-      r->width = XFASTINT (s->w->width) * CANON_X_UNIT (s->f);
+      int canon_x = CANON_X_UNIT (s->f);
+      
+      r->x = WINDOW_LEFT_MARGIN (s->w) * canon_x;
+      r->width = XFASTINT (s->w->width) * canon_x;
 
       if (FRAME_HAS_VERTICAL_SCROLL_BARS (s->f))
 	{
-	  int width = FRAME_SCROLL_BAR_WIDTH (s->f) * CANON_X_UNIT (s->f);
-	  r->width += width;
+	  int width = FRAME_SCROLL_BAR_WIDTH (s->f) * canon_x;
 	  if (FRAME_HAS_VERTICAL_SCROLL_BARS_ON_LEFT (s->f))
 	    r->x -= width;
 	}
       
+      /* If row should not extend over internal borders, adjust x.  */
+      if (!s->row->internal_border_p)
+	r->x += FRAME_INTERNAL_BORDER_WIDTH (s->f);
+      
       /* Unless displaying a mode or menu bar line, which are always
 	 fully visible, clip to the visible part of the row.  */
       if (s->w->pseudo_window_p)
@@ -3231,7 +3236,7 @@
   raised_p = s->face->box == FACE_RAISED_BOX;
   left_x = s->x;
   right_x = ((s->row->full_width_p
-	      ? last_x
+	      ? last_x - 1
 	      : min (last_x, s->x + s->width) - 1));
   top_y = s->y;
   bottom_y = top_y + s->height - 1;
@@ -4019,7 +4024,7 @@
      background_width to the distance to the right edge of the drawing
      area.  */
   if (s->extends_to_end_of_line_p)
-    s->background_width = last_x - s->x;
+    s->background_width = last_x - s->x + 1;
   else
     s->background_width = s->width;
 }
@@ -4263,10 +4268,10 @@
 
       /* If row should extend over internal borders, adjust x and
          width accordingly.  */
-      if (row->internal_border_p)
+      if (!row->internal_border_p)
 	{
 	  x += FRAME_INTERNAL_BORDER_WIDTH (f);
-	  width -= 2 * FRAME_INTERNAL_BORDER_WIDTH (f);
+	  last_x -= FRAME_INTERNAL_BORDER_WIDTH (f);
 	}
     }
   else