aboutsummaryrefslogtreecommitdiffstats
path: root/src/w32term.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/w32term.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/w32term.c')
-rw-r--r--src/w32term.c52
1 files changed, 39 insertions, 13 deletions
diff --git a/src/w32term.c b/src/w32term.c
index f6a6ba3e82f..d22aee6dc76 100644
--- a/src/w32term.c
+++ b/src/w32term.c
@@ -715,22 +715,22 @@ w32_draw_fringe_bitmap (struct window *w, struct glyph_row *row,
715 715
716 if (sb_width > 0) 716 if (sb_width > 0)
717 { 717 {
718 int left = WINDOW_SCROLL_BAR_AREA_X (w); 718 int bar_area_x = WINDOW_SCROLL_BAR_AREA_X (w);
719 int width = (WINDOW_CONFIG_SCROLL_BAR_COLS (w) 719 int bar_area_width = (WINDOW_CONFIG_SCROLL_BAR_COLS (w)
720 * FRAME_COLUMN_WIDTH (f)); 720 * FRAME_COLUMN_WIDTH (f));
721 721
722 if (bx < 0) 722 if (bx < 0)
723 { 723 {
724 /* Bitmap fills the fringe. */ 724 /* Bitmap fills the fringe. */
725 if (left + width == p->x) 725 if (bar_area_x + bar_area_width == p->x)
726 bx = left + sb_width; 726 bx = bar_area_x + sb_width;
727 else if (p->x + p->wd == left) 727 else if (p->x + p->wd == bar_area_x)
728 bx = left; 728 bx = bar_area_x;
729 if (bx >= 0) 729 if (bx >= 0)
730 { 730 {
731 int header_line_height = WINDOW_HEADER_LINE_HEIGHT (w); 731 int header_line_height = WINDOW_HEADER_LINE_HEIGHT (w);
732 732
733 nx = width - sb_width; 733 nx = bar_area_width - sb_width;
734 by = WINDOW_TO_FRAME_PIXEL_Y (w, max (header_line_height, 734 by = WINDOW_TO_FRAME_PIXEL_Y (w, max (header_line_height,
735 row->y)); 735 row->y));
736 ny = row->visible_height; 736 ny = row->visible_height;
@@ -738,13 +738,13 @@ w32_draw_fringe_bitmap (struct window *w, struct glyph_row *row,
738 } 738 }
739 else 739 else
740 { 740 {
741 if (left + width == bx) 741 if (bar_area_x + bar_area_width == bx)
742 { 742 {
743 bx = left + sb_width; 743 bx = bar_area_x + sb_width;
744 nx += width - sb_width; 744 nx += bar_area_width - sb_width;
745 } 745 }
746 else if (bx + nx == left) 746 else if (bx + nx == bar_area_x)
747 nx += width - sb_width; 747 nx += bar_area_width - sb_width;
748 } 748 }
749 } 749 }
750 } 750 }
@@ -2619,6 +2619,32 @@ x_scroll_run (struct window *w, struct run *run)
2619 fringes of W. */ 2619 fringes of W. */
2620 window_box (w, -1, &x, &y, &width, &height); 2620 window_box (w, -1, &x, &y, &width, &height);
2621 2621
2622 /* If the fringe is adjacent to the left (right) scroll bar of a
2623 leftmost (rightmost, respectively) window, then extend its
2624 background to the gap between the fringe and the bar. */
2625 if ((WINDOW_LEFTMOST_P (w)
2626 && WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_LEFT (w))
2627 || (WINDOW_RIGHTMOST_P (w)
2628 && WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_RIGHT (w)))
2629 {
2630 int sb_width = WINDOW_CONFIG_SCROLL_BAR_WIDTH (w);
2631
2632 if (sb_width > 0)
2633 {
2634 int bar_area_x = WINDOW_SCROLL_BAR_AREA_X (w);
2635 int bar_area_width = (WINDOW_CONFIG_SCROLL_BAR_COLS (w)
2636 * FRAME_COLUMN_WIDTH (f));
2637
2638 if (bar_area_x + bar_area_width == x)
2639 {
2640 x = bar_area_x + sb_width;
2641 width += bar_area_width - sb_width;
2642 }
2643 else if (x + width == bar_area_x)
2644 width += bar_area_width - sb_width;
2645 }
2646 }
2647
2622 from_y = WINDOW_TO_FRAME_PIXEL_Y (w, run->current_y); 2648 from_y = WINDOW_TO_FRAME_PIXEL_Y (w, run->current_y);
2623 to_y = WINDOW_TO_FRAME_PIXEL_Y (w, run->desired_y); 2649 to_y = WINDOW_TO_FRAME_PIXEL_Y (w, run->desired_y);
2624 bottom_y = y + height; 2650 bottom_y = y + height;