aboutsummaryrefslogtreecommitdiffstats
path: root/src/xterm.c
diff options
context:
space:
mode:
authorGlenn Morris2011-05-12 00:07:06 -0700
committerGlenn Morris2011-05-12 00:07:06 -0700
commitd2fc7e3d0f6f57f962cbd94df3bf4fd15a37bb68 (patch)
treee6d877c35b4396bd5092a7be244b1527374d4a0e /src/xterm.c
parentd45885f7e0025fb5bd0756ba78c511a981d64533 (diff)
parente531bdfff1ee57a0ba4af6c8575ed7856e4c86d2 (diff)
downloademacs-d2fc7e3d0f6f57f962cbd94df3bf4fd15a37bb68.tar.gz
emacs-d2fc7e3d0f6f57f962cbd94df3bf4fd15a37bb68.zip
Merge from emacs-23; up to 2010-06-10T12:56:11Z!michael.albinus@gmx.de.
Diffstat (limited to 'src/xterm.c')
-rw-r--r--src/xterm.c54
1 files changed, 41 insertions, 13 deletions
diff --git a/src/xterm.c b/src/xterm.c
index 20259b7ab2e..2352f51cfb7 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -753,22 +753,22 @@ x_draw_fringe_bitmap (struct window *w, struct glyph_row *row, struct draw_fring
753 753
754 if (sb_width > 0) 754 if (sb_width > 0)
755 { 755 {
756 int left = WINDOW_SCROLL_BAR_AREA_X (w); 756 int bar_area_x = WINDOW_SCROLL_BAR_AREA_X (w);
757 int width = (WINDOW_CONFIG_SCROLL_BAR_COLS (w) 757 int bar_area_width = (WINDOW_CONFIG_SCROLL_BAR_COLS (w)
758 * FRAME_COLUMN_WIDTH (f)); 758 * FRAME_COLUMN_WIDTH (f));
759 759
760 if (bx < 0) 760 if (bx < 0)
761 { 761 {
762 /* Bitmap fills the fringe. */ 762 /* Bitmap fills the fringe. */
763 if (left + width == p->x) 763 if (bar_area_x + bar_area_width == p->x)
764 bx = left + sb_width; 764 bx = bar_area_x + sb_width;
765 else if (p->x + p->wd == left) 765 else if (p->x + p->wd == bar_area_x)
766 bx = left; 766 bx = bar_area_x;
767 if (bx >= 0) 767 if (bx >= 0)
768 { 768 {
769 int header_line_height = WINDOW_HEADER_LINE_HEIGHT (w); 769 int header_line_height = WINDOW_HEADER_LINE_HEIGHT (w);
770 770
771 nx = width - sb_width; 771 nx = bar_area_width - sb_width;
772 by = WINDOW_TO_FRAME_PIXEL_Y (w, max (header_line_height, 772 by = WINDOW_TO_FRAME_PIXEL_Y (w, max (header_line_height,
773 row->y)); 773 row->y));
774 ny = row->visible_height; 774 ny = row->visible_height;
@@ -776,13 +776,13 @@ x_draw_fringe_bitmap (struct window *w, struct glyph_row *row, struct draw_fring
776 } 776 }
777 else 777 else
778 { 778 {
779 if (left + width == bx) 779 if (bar_area_x + bar_area_width == bx)
780 { 780 {
781 bx = left + sb_width; 781 bx = bar_area_x + sb_width;
782 nx += width - sb_width; 782 nx += bar_area_width - sb_width;
783 } 783 }
784 else if (bx + nx == left) 784 else if (bx + nx == bar_area_x)
785 nx += width - sb_width; 785 nx += bar_area_width - sb_width;
786 } 786 }
787 } 787 }
788 } 788 }
@@ -3232,6 +3232,34 @@ x_scroll_run (struct window *w, struct run *run)
3232 fringe of W. */ 3232 fringe of W. */
3233 window_box (w, -1, &x, &y, &width, &height); 3233 window_box (w, -1, &x, &y, &width, &height);
3234 3234
3235#ifdef USE_TOOLKIT_SCROLL_BARS
3236 /* If the fringe is adjacent to the left (right) scroll bar of a
3237 leftmost (rightmost, respectively) window, then extend its
3238 background to the gap between the fringe and the bar. */
3239 if ((WINDOW_LEFTMOST_P (w)
3240 && WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_LEFT (w))
3241 || (WINDOW_RIGHTMOST_P (w)
3242 && WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_RIGHT (w)))
3243 {
3244 int sb_width = WINDOW_CONFIG_SCROLL_BAR_WIDTH (w);
3245
3246 if (sb_width > 0)
3247 {
3248 int bar_area_x = WINDOW_SCROLL_BAR_AREA_X (w);
3249 int bar_area_width = (WINDOW_CONFIG_SCROLL_BAR_COLS (w)
3250 * FRAME_COLUMN_WIDTH (f));
3251
3252 if (bar_area_x + bar_area_width == x)
3253 {
3254 x = bar_area_x + sb_width;
3255 width += bar_area_width - sb_width;
3256 }
3257 else if (x + width == bar_area_x)
3258 width += bar_area_width - sb_width;
3259 }
3260 }
3261#endif
3262
3235 from_y = WINDOW_TO_FRAME_PIXEL_Y (w, run->current_y); 3263 from_y = WINDOW_TO_FRAME_PIXEL_Y (w, run->current_y);
3236 to_y = WINDOW_TO_FRAME_PIXEL_Y (w, run->desired_y); 3264 to_y = WINDOW_TO_FRAME_PIXEL_Y (w, run->desired_y);
3237 bottom_y = y + height; 3265 bottom_y = y + height;