# HG changeset patch # User Kim F. Storm # Date 1106234602 0 # Node ID 369714ad80edb6dbe7cbed0cb782957731f9103a # Parent 9a3b84758dc1e6285fdc23b6bdfba96febc3d1d6 (x_draw_glyph_string_box): Fix last_x for full width rows. diff -r 9a3b84758dc1 -r 369714ad80ed src/macterm.c --- a/src/macterm.c Thu Jan 20 15:21:45 2005 +0000 +++ b/src/macterm.c Thu Jan 20 15:23:22 2005 +0000 @@ -2642,15 +2642,9 @@ struct glyph *last_glyph; Rect clip_rect; - last_x = window_box_right (s->w, s->area); - if (s->row->full_width_p - && !s->w->pseudo_window_p) - { - last_x += WINDOW_RIGHT_SCROLL_BAR_AREA_WIDTH (s->w); - if (s->area != RIGHT_MARGIN_AREA - || WINDOW_HAS_FRINGES_OUTSIDE_MARGINS (s->w)) - last_x += WINDOW_RIGHT_FRINGE_WIDTH (s->w); - } + last_x = ((s->row->full_width_p && !s->w->pseudo_window_p) + ? WINDOW_RIGHT_EDGE_X (s->w) + : window_box_right (s->w, s->area)); /* The glyph that may have a right box line. */ last_glyph = (s->cmp || s->img diff -r 9a3b84758dc1 -r 369714ad80ed src/w32term.c --- a/src/w32term.c Thu Jan 20 15:21:45 2005 +0000 +++ b/src/w32term.c Thu Jan 20 15:23:22 2005 +0000 @@ -1921,15 +1921,9 @@ struct glyph *last_glyph; RECT clip_rect; - last_x = window_box_right (s->w, s->area); - if (s->row->full_width_p - && !s->w->pseudo_window_p) - { - last_x += WINDOW_RIGHT_SCROLL_BAR_AREA_WIDTH (s->w); - if (s->area != RIGHT_MARGIN_AREA - || WINDOW_HAS_FRINGES_OUTSIDE_MARGINS (s->w)) - last_x += WINDOW_RIGHT_FRINGE_WIDTH (s->w); - } + last_x = ((s->row->full_width_p && !s->w->pseudo_window_p) + ? WINDOW_RIGHT_EDGE_X (s->w) + : window_box_right (s->w, s->area)); /* The glyph that may have a right box line. */ last_glyph = (s->cmp || s->img diff -r 9a3b84758dc1 -r 369714ad80ed src/xterm.c --- a/src/xterm.c Thu Jan 20 15:21:45 2005 +0000 +++ b/src/xterm.c Thu Jan 20 15:23:22 2005 +0000 @@ -2127,15 +2127,9 @@ struct glyph *last_glyph; XRectangle clip_rect; - last_x = window_box_right (s->w, s->area); - if (s->row->full_width_p - && !s->w->pseudo_window_p) - { - last_x += WINDOW_RIGHT_SCROLL_BAR_AREA_WIDTH (s->w); - if (s->area != RIGHT_MARGIN_AREA - || WINDOW_HAS_FRINGES_OUTSIDE_MARGINS (s->w)) - last_x += WINDOW_RIGHT_FRINGE_WIDTH (s->w); - } + last_x = ((s->row->full_width_p && !s->w->pseudo_window_p) + ? WINDOW_RIGHT_EDGE_X (s->w) + : window_box_right (s->w, s->area)); /* The glyph that may have a right box line. */ last_glyph = (s->cmp || s->img @@ -4329,7 +4323,7 @@ } if (part >= 0) - { + { window_being_scrolled = bar->window; last_scroll_bar_part = part; x_send_scroll_bar_event (bar->window, part, portion, whole);