-/*****************************************************************************
- mswindows_clear_to_window_end
-
- Clear the area between ypos1 and ypos2. Each margin area and the
- text area is handled separately since they may each have their own
- background color.
- ****************************************************************************/
-static void
-mswindows_clear_to_window_end (struct window *w, int ypos1, int ypos2)
-{
- int height = ypos2 - ypos1;
-
- if (height)
- {
- struct frame *f = XFRAME (w->frame);
- Lisp_Object window;
- int bflag = (window_needs_vertical_divider (w) ? 0 : 1);
- layout_bounds bounds;
-
- bounds = calculate_display_line_boundaries (w, bflag);
- XSETWINDOW (window, w);
-
- if (window_is_leftmost (w))
- redisplay_clear_region (window, DEFAULT_INDEX, FRAME_LEFT_BORDER_START (f),
- ypos1, FRAME_BORDER_WIDTH (f), height);
-
- if (bounds.left_in - bounds.left_out > 0)
- redisplay_clear_region (window,
- get_builtin_face_cache_index (w, Vleft_margin_face),
- bounds.left_out, ypos1,
- bounds.left_in - bounds.left_out, height);
-
- if (bounds.right_in - bounds.left_in > 0)
- redisplay_clear_region (window, DEFAULT_INDEX, bounds.left_in, ypos1,
- bounds.right_in - bounds.left_in, height);
-
- if (bounds.right_out - bounds.right_in > 0)
- redisplay_clear_region (window,
- get_builtin_face_cache_index (w, Vright_margin_face),
- bounds.right_in, ypos1,
- bounds.right_out - bounds.right_in, height);
-
- if (window_is_rightmost (w))
- redisplay_clear_region (window, DEFAULT_INDEX, FRAME_RIGHT_BORDER_START (f),
- ypos1, FRAME_BORDER_WIDTH (f), height);
- }
-
-}
-
-