diff options
| author | Michael Albinus | 2017-11-20 14:16:28 +0100 |
|---|---|---|
| committer | Michael Albinus | 2017-11-20 14:16:28 +0100 |
| commit | 5622b2e26337c531304ac7177a347edb92edf804 (patch) | |
| tree | 6ff11009735fedfebe438161c5e4bab670c43772 /src | |
| parent | 504a56cf329f25f73b450e3f280144caf6e0b0d2 (diff) | |
| parent | 4da87999c234155300b30b01c5a7e221d65e4cc8 (diff) | |
| download | emacs-5622b2e26337c531304ac7177a347edb92edf804.tar.gz emacs-5622b2e26337c531304ac7177a347edb92edf804.zip | |
Merge branch 'emacs-26' of git.sv.gnu.org:/srv/git/emacs into emacs-26
Diffstat (limited to 'src')
| -rw-r--r-- | src/w32term.c | 12 | ||||
| -rw-r--r-- | src/xterm.c | 12 |
2 files changed, 16 insertions, 8 deletions
diff --git a/src/w32term.c b/src/w32term.c index e62d49dd947..7a3b2cc631f 100644 --- a/src/w32term.c +++ b/src/w32term.c | |||
| @@ -660,21 +660,25 @@ w32_draw_window_divider (struct window *w, int x0, int x1, int y0, int y1) | |||
| 660 | ? face_last->foreground | 660 | ? face_last->foreground |
| 661 | : FRAME_FOREGROUND_PIXEL (f)); | 661 | : FRAME_FOREGROUND_PIXEL (f)); |
| 662 | 662 | ||
| 663 | if (y1 - y0 > x1 - x0 && x1 - x0 > 2) | 663 | if ((y1 - y0 > x1 - x0) && (x1 - x0 >= 3)) |
| 664 | /* Vertical. */ | 664 | /* A vertical divider, at least three pixels wide: Draw first and |
| 665 | last pixels differently. */ | ||
| 665 | { | 666 | { |
| 666 | w32_fill_area_abs (f, hdc, color_first, x0, y0, x0 + 1, y1); | 667 | w32_fill_area_abs (f, hdc, color_first, x0, y0, x0 + 1, y1); |
| 667 | w32_fill_area_abs (f, hdc, color, x0 + 1, y0, x1 - 1, y1); | 668 | w32_fill_area_abs (f, hdc, color, x0 + 1, y0, x1 - 1, y1); |
| 668 | w32_fill_area_abs (f, hdc, color_last, x1 - 1, y0, x1, y1); | 669 | w32_fill_area_abs (f, hdc, color_last, x1 - 1, y0, x1, y1); |
| 669 | } | 670 | } |
| 670 | else if (x1 - x0 > y1 - y0 && y1 - y0 > 3) | 671 | else if ((x1 - x0 > y1 - y0) && (y1 - y0 >= 3)) |
| 671 | /* Horizontal. */ | 672 | /* A horizontal divider, at least three pixels high: Draw first and |
| 673 | last pixels differently. */ | ||
| 672 | { | 674 | { |
| 673 | w32_fill_area_abs (f, hdc, color_first, x0, y0, x1, y0 + 1); | 675 | w32_fill_area_abs (f, hdc, color_first, x0, y0, x1, y0 + 1); |
| 674 | w32_fill_area_abs (f, hdc, color, x0, y0 + 1, x1, y1 - 1); | 676 | w32_fill_area_abs (f, hdc, color, x0, y0 + 1, x1, y1 - 1); |
| 675 | w32_fill_area_abs (f, hdc, color_last, x0, y1 - 1, x1, y1); | 677 | w32_fill_area_abs (f, hdc, color_last, x0, y1 - 1, x1, y1); |
| 676 | } | 678 | } |
| 677 | else | 679 | else |
| 680 | /* In any other case do not draw the first and last pixels | ||
| 681 | differently. */ | ||
| 678 | w32_fill_area_abs (f, hdc, color, x0, y0, x1, y1); | 682 | w32_fill_area_abs (f, hdc, color, x0, y0, x1, y1); |
| 679 | 683 | ||
| 680 | release_frame_dc (f, hdc); | 684 | release_frame_dc (f, hdc); |
diff --git a/src/xterm.c b/src/xterm.c index 28abfaecde9..1deb7b46013 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -1104,8 +1104,9 @@ x_draw_window_divider (struct window *w, int x0, int x1, int y0, int y1) | |||
| 1104 | : FRAME_FOREGROUND_PIXEL (f)); | 1104 | : FRAME_FOREGROUND_PIXEL (f)); |
| 1105 | Display *display = FRAME_X_DISPLAY (f); | 1105 | Display *display = FRAME_X_DISPLAY (f); |
| 1106 | 1106 | ||
| 1107 | if (y1 - y0 > x1 - x0 && x1 - x0 > 2) | 1107 | if ((y1 - y0 > x1 - x0) && (x1 - x0 >= 3)) |
| 1108 | /* Vertical. */ | 1108 | /* A vertical divider, at least three pixels wide: Draw first and |
| 1109 | last pixels differently. */ | ||
| 1109 | { | 1110 | { |
| 1110 | XSetForeground (display, f->output_data.x->normal_gc, color_first); | 1111 | XSetForeground (display, f->output_data.x->normal_gc, color_first); |
| 1111 | x_fill_rectangle (f, f->output_data.x->normal_gc, | 1112 | x_fill_rectangle (f, f->output_data.x->normal_gc, |
| @@ -1117,8 +1118,9 @@ x_draw_window_divider (struct window *w, int x0, int x1, int y0, int y1) | |||
| 1117 | x_fill_rectangle (f, f->output_data.x->normal_gc, | 1118 | x_fill_rectangle (f, f->output_data.x->normal_gc, |
| 1118 | x1 - 1, y0, 1, y1 - y0); | 1119 | x1 - 1, y0, 1, y1 - y0); |
| 1119 | } | 1120 | } |
| 1120 | else if (x1 - x0 > y1 - y0 && y1 - y0 > 3) | 1121 | else if ((x1 - x0 > y1 - y0) && (y1 - y0 >= 3)) |
| 1121 | /* Horizontal. */ | 1122 | /* A horizontal divider, at least three pixels high: Draw first and |
| 1123 | last pixels differently. */ | ||
| 1122 | { | 1124 | { |
| 1123 | XSetForeground (display, f->output_data.x->normal_gc, color_first); | 1125 | XSetForeground (display, f->output_data.x->normal_gc, color_first); |
| 1124 | x_fill_rectangle (f, f->output_data.x->normal_gc, | 1126 | x_fill_rectangle (f, f->output_data.x->normal_gc, |
| @@ -1132,6 +1134,8 @@ x_draw_window_divider (struct window *w, int x0, int x1, int y0, int y1) | |||
| 1132 | } | 1134 | } |
| 1133 | else | 1135 | else |
| 1134 | { | 1136 | { |
| 1137 | /* In any other case do not draw the first and last pixels | ||
| 1138 | differently. */ | ||
| 1135 | XSetForeground (display, f->output_data.x->normal_gc, color); | 1139 | XSetForeground (display, f->output_data.x->normal_gc, color); |
| 1136 | x_fill_rectangle (f, f->output_data.x->normal_gc, | 1140 | x_fill_rectangle (f, f->output_data.x->normal_gc, |
| 1137 | x0, y0, x1 - x0, y1 - y0); | 1141 | x0, y0, x1 - x0, y1 - y0); |