From 82ead4b1427e6804c18ed7acb7c8e99a93059af0 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Thu, 20 Jan 2005 15:23:22 +0000 Subject: [PATCH] (x_draw_glyph_string_box): Fix last_x for full width rows. --- src/macterm.c | 12 +++--------- src/w32term.c | 12 +++--------- src/xterm.c | 14 ++++---------- 3 files changed, 10 insertions(+), 28 deletions(-) diff --git a/src/macterm.c b/src/macterm.c index ebebb129bb8..24aaa52947b 100644 --- a/src/macterm.c +++ b/src/macterm.c @@ -2642,15 +2642,9 @@ x_draw_glyph_string_box (s) 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 --git a/src/w32term.c b/src/w32term.c index a0b00d58659..838e1f57222 100644 --- a/src/w32term.c +++ b/src/w32term.c @@ -1921,15 +1921,9 @@ x_draw_glyph_string_box (s) 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 --git a/src/xterm.c b/src/xterm.c index 0dafcfb0101..3e54a46c714 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -2127,15 +2127,9 @@ x_draw_glyph_string_box (s) 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 @@ xg_scroll_callback (widget, data) } if (part >= 0) - { + { window_being_scrolled = bar->window; last_scroll_bar_part = part; x_send_scroll_bar_event (bar->window, part, portion, whole); -- 2.39.2