aboutsummaryrefslogtreecommitdiffstats
path: root/src/w32term.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/w32term.c')
-rw-r--r--src/w32term.c42
1 files changed, 27 insertions, 15 deletions
diff --git a/src/w32term.c b/src/w32term.c
index 03d5a0047bc..b77d01796d7 100644
--- a/src/w32term.c
+++ b/src/w32term.c
@@ -628,26 +628,38 @@ static void
628w32_draw_window_divider (struct window *w, int x0, int x1, int y0, int y1) 628w32_draw_window_divider (struct window *w, int x0, int x1, int y0, int y1)
629{ 629{
630 struct frame *f = XFRAME (WINDOW_FRAME (w)); 630 struct frame *f = XFRAME (WINDOW_FRAME (w));
631 RECT r; 631 HDC hdc = get_frame_dc (f);
632 HDC hdc; 632 struct face *face = FACE_FROM_ID (f, WINDOW_DIVIDER_FACE_ID);
633 struct face *face; 633 struct face *face_first = FACE_FROM_ID (f, WINDOW_DIVIDER_FIRST_PIXEL_FACE_ID);
634 634 struct face *face_last = FACE_FROM_ID (f, WINDOW_DIVIDER_LAST_PIXEL_FACE_ID);
635 r.left = x0; 635 unsigned long color = face ? face->foreground : FRAME_FOREGROUND_PIXEL (f);
636 r.right = x1; 636 unsigned long color_first = (face_first
637 r.top = y0; 637 ? face_first->foreground
638 r.bottom = y1; 638 : FRAME_FOREGROUND_PIXEL (f));
639 639 unsigned long color_last = (face_last
640 hdc = get_frame_dc (f); 640 ? face_last->foreground
641 face = FACE_FROM_ID (f, WINDOW_DIVIDER_FACE_ID); 641 : FRAME_FOREGROUND_PIXEL (f));
642 if (face) 642
643 w32_fill_rect (f, hdc, face->foreground, &r); 643 if (y1 - y0 > x1 - x0 && x1 - x0 > 2)
644 /* Vertical. */
645 {
646 w32_fill_area_abs (f, hdc, color_first, x0, y0, x0 + 1, y1);
647 w32_fill_area_abs (f, hdc, color, x0 + 1, y0, x1 - 1, y1);
648 w32_fill_area_abs (f, hdc, color_last, x1 - 1, y0, x1, y1);
649 }
650 else if (x1 - x0 > y1 - y0 && y1 - y0 > 3)
651 /* Horizontal. */
652 {
653 w32_fill_area_abs (f, hdc, color_first, x0, y0, x1, y0 + 1);
654 w32_fill_area_abs (f, hdc, color, x0, y0 + 1, x1, y1 - 1);
655 w32_fill_area_abs (f, hdc, color_last, x0, y1 - 1, x1, y1);
656 }
644 else 657 else
645 w32_fill_rect (f, hdc, FRAME_FOREGROUND_PIXEL (f), &r); 658 w32_fill_area_abs (f, hdc, color, x0, y0, x1, y1);
646 659
647 release_frame_dc (f, hdc); 660 release_frame_dc (f, hdc);
648} 661}
649 662
650
651/* End update of window W. 663/* End update of window W.
652 664
653 Draw vertical borders between horizontally adjacent windows, and 665 Draw vertical borders between horizontally adjacent windows, and