aboutsummaryrefslogtreecommitdiffstats
path: root/src/w32term.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/w32term.c')
-rw-r--r--src/w32term.c27
1 files changed, 9 insertions, 18 deletions
diff --git a/src/w32term.c b/src/w32term.c
index 15812f93ff5..2b30673c75d 100644
--- a/src/w32term.c
+++ b/src/w32term.c
@@ -3770,7 +3770,7 @@ x_scroll_bar_create (struct window *w, int top, int left, int width, int height)
3770 XSETINT (bar->start, 0); 3770 XSETINT (bar->start, 0);
3771 XSETINT (bar->end, 0); 3771 XSETINT (bar->end, 0);
3772 bar->dragging = Qnil; 3772 bar->dragging = Qnil;
3773 bar->fringe_extended_p = Qnil; 3773 bar->fringe_extended_p = 0;
3774 3774
3775 /* Requires geometry to be set before call to create the real window */ 3775 /* Requires geometry to be set before call to create the real window */
3776 3776
@@ -3834,7 +3834,7 @@ w32_set_vertical_scroll_bar (struct window *w,
3834 struct scroll_bar *bar; 3834 struct scroll_bar *bar;
3835 int top, height, left, sb_left, width, sb_width; 3835 int top, height, left, sb_left, width, sb_width;
3836 int window_y, window_height; 3836 int window_y, window_height;
3837 int fringe_extended_p; 3837 bool fringe_extended_p;
3838 3838
3839 /* Get window dimensions. */ 3839 /* Get window dimensions. */
3840 window_box (w, -1, 0, &window_y, 0, &window_height); 3840 window_box (w, -1, 0, &window_y, 0, &window_height);
@@ -3858,16 +3858,7 @@ w32_set_vertical_scroll_bar (struct window *w,
3858 else 3858 else
3859 sb_left = left + (WINDOW_LEFTMOST_P (w) ? 0 : width - sb_width); 3859 sb_left = left + (WINDOW_LEFTMOST_P (w) ? 0 : width - sb_width);
3860 3860
3861 if (WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_LEFT (w)) 3861 fringe_extended_p = WINDOW_FRINGE_EXTENDED_P (w);
3862 fringe_extended_p = (WINDOW_LEFTMOST_P (w)
3863 && WINDOW_LEFT_FRINGE_WIDTH (w)
3864 && (WINDOW_HAS_FRINGES_OUTSIDE_MARGINS (w)
3865 || WINDOW_LEFT_MARGIN_COLS (w) == 0));
3866 else
3867 fringe_extended_p = (WINDOW_RIGHTMOST_P (w)
3868 && WINDOW_RIGHT_FRINGE_WIDTH (w)
3869 && (WINDOW_HAS_FRINGES_OUTSIDE_MARGINS (w)
3870 || WINDOW_RIGHT_MARGIN_COLS (w) == 0));
3871 3862
3872 /* Does the scroll bar exist yet? */ 3863 /* Does the scroll bar exist yet? */
3873 if (NILP (w->vertical_scroll_bar)) 3864 if (NILP (w->vertical_scroll_bar))
@@ -3896,11 +3887,11 @@ w32_set_vertical_scroll_bar (struct window *w,
3896 hwnd = SCROLL_BAR_W32_WINDOW (bar); 3887 hwnd = SCROLL_BAR_W32_WINDOW (bar);
3897 3888
3898 /* If already correctly positioned, do nothing. */ 3889 /* If already correctly positioned, do nothing. */
3899 if ( XINT (bar->left) == sb_left 3890 if (XINT (bar->left) == sb_left
3900 && XINT (bar->top) == top 3891 && XINT (bar->top) == top
3901 && XINT (bar->width) == sb_width 3892 && XINT (bar->width) == sb_width
3902 && XINT (bar->height) == height 3893 && XINT (bar->height) == height
3903 && !NILP (bar->fringe_extended_p) == fringe_extended_p ) 3894 && bar->fringe_extended_p == fringe_extended_p)
3904 { 3895 {
3905 /* Redraw after clear_frame. */ 3896 /* Redraw after clear_frame. */
3906 if (!my_show_window (f, hwnd, SW_NORMAL)) 3897 if (!my_show_window (f, hwnd, SW_NORMAL))
@@ -3950,7 +3941,7 @@ w32_set_vertical_scroll_bar (struct window *w,
3950 unblock_input (); 3941 unblock_input ();
3951 } 3942 }
3952 } 3943 }
3953 bar->fringe_extended_p = fringe_extended_p ? Qt : Qnil; 3944 bar->fringe_extended_p = fringe_extended_p;
3954 3945
3955 w32_set_scroll_bar_thumb (bar, portion, position, whole); 3946 w32_set_scroll_bar_thumb (bar, portion, position, whole);
3956 XSETVECTOR (barobj, bar); 3947 XSETVECTOR (barobj, bar);