aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii2019-03-09 19:45:13 +0200
committerEli Zaretskii2019-03-09 19:45:13 +0200
commit9fe7f233597d8a6ac72a61e1fb197e45a8c73370 (patch)
tree8e12bcd6870f8c546cee6dbe609e205ed8c20614 /src
parent21f54feee8c83e2c5fd8eeb6741cbd479a7b19eb (diff)
downloademacs-9fe7f233597d8a6ac72a61e1fb197e45a8c73370.tar.gz
emacs-9fe7f233597d8a6ac72a61e1fb197e45a8c73370.zip
Consult 'face-remapping-alist' for 'internal-border' face
* src/xterm.c (x_clear_under_internal_border) (x_after_update_window_line): * src/w32fns.c (x_clear_under_internal_border): * src/w32term.c (x_after_update_window_line): Consult 'face-remapping-alist' when using the 'internal-border' face.
Diffstat (limited to 'src')
-rw-r--r--src/w32fns.c8
-rw-r--r--src/w32term.c41
-rw-r--r--src/xterm.c12
3 files changed, 38 insertions, 23 deletions
diff --git a/src/w32fns.c b/src/w32fns.c
index 4a32d496350..4f53d93d8b4 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -1650,12 +1650,16 @@ x_clear_under_internal_border (struct frame *f)
1650 /* Clear border if it's larger than before. */ 1650 /* Clear border if it's larger than before. */
1651 if (border != 0) 1651 if (border != 0)
1652 { 1652 {
1653 HDC hdc = get_frame_dc (f);
1654 int width = FRAME_PIXEL_WIDTH (f); 1653 int width = FRAME_PIXEL_WIDTH (f);
1655 int height = FRAME_PIXEL_HEIGHT (f); 1654 int height = FRAME_PIXEL_HEIGHT (f);
1656 struct face *face = FACE_FROM_ID_OR_NULL (f, INTERNAL_BORDER_FACE_ID); 1655 int face_id =
1656 !NILP (Vface_remapping_alist)
1657 ? lookup_basic_face (NULL, f, INTERNAL_BORDER_FACE_ID)
1658 : INTERNAL_BORDER_FACE_ID;
1659 struct face *face = FACE_FROM_ID_OR_NULL (f, face_id);
1657 1660
1658 block_input (); 1661 block_input ();
1662 HDC hdc = get_frame_dc (f);
1659 if (face) 1663 if (face)
1660 { 1664 {
1661 /* Fill border with internal border face. */ 1665 /* Fill border with internal border face. */
diff --git a/src/w32term.c b/src/w32term.c
index bdd02d05400..0f0d6482fc3 100644
--- a/src/w32term.c
+++ b/src/w32term.c
@@ -800,29 +800,32 @@ x_after_update_window_line (struct window *w, struct glyph_row *desired_row)
800 height > 0)) 800 height > 0))
801 { 801 {
802 int y = WINDOW_TO_FRAME_PIXEL_Y (w, max (0, desired_row->y)); 802 int y = WINDOW_TO_FRAME_PIXEL_Y (w, max (0, desired_row->y));
803 int face_id =
804 !NILP (Vface_remapping_alist)
805 ? lookup_basic_face (NULL, f, INTERNAL_BORDER_FACE_ID)
806 : INTERNAL_BORDER_FACE_ID;
807 struct face *face = FACE_FROM_ID_OR_NULL (f, face_id);
803 808
804 block_input (); 809 block_input ();
805 {
806 HDC hdc = get_frame_dc (f);
807 struct face *face = FACE_FROM_ID_OR_NULL (f, INTERNAL_BORDER_FACE_ID);
808 810
809 if (face) 811 HDC hdc = get_frame_dc (f);
810 { 812 if (face)
811 /* Fill border with internal border face. */ 813 {
812 unsigned long color = face->background; 814 /* Fill border with internal border face. */
815 unsigned long color = face->background;
816
817 w32_fill_area (f, hdc, color, 0, y, width, height);
818 w32_fill_area (f, hdc, color, FRAME_PIXEL_WIDTH (f) - width,
819 y, width, height);
820 }
821 else
822 {
823 w32_clear_area (f, hdc, 0, y, width, height);
824 w32_clear_area (f, hdc, FRAME_PIXEL_WIDTH (f) - width,
825 y, width, height);
826 }
827 release_frame_dc (f, hdc);
813 828
814 w32_fill_area (f, hdc, color, 0, y, width, height);
815 w32_fill_area (f, hdc, color, FRAME_PIXEL_WIDTH (f) - width,
816 y, width, height);
817 }
818 else
819 {
820 w32_clear_area (f, hdc, 0, y, width, height);
821 w32_clear_area (f, hdc, FRAME_PIXEL_WIDTH (f) - width,
822 y, width, height);
823 }
824 release_frame_dc (f, hdc);
825 }
826 unblock_input (); 829 unblock_input ();
827 } 830 }
828} 831}
diff --git a/src/xterm.c b/src/xterm.c
index 73a38de3719..1b0c2f5ec50 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -1302,7 +1302,11 @@ x_clear_under_internal_border (struct frame *f)
1302#else 1302#else
1303 int margin = FRAME_TOP_MARGIN_HEIGHT (f); 1303 int margin = FRAME_TOP_MARGIN_HEIGHT (f);
1304#endif 1304#endif
1305 struct face *face = FACE_FROM_ID_OR_NULL (f, INTERNAL_BORDER_FACE_ID); 1305 int face_id =
1306 !NILP (Vface_remapping_alist)
1307 ? lookup_basic_face (NULL, f, INTERNAL_BORDER_FACE_ID)
1308 : INTERNAL_BORDER_FACE_ID;
1309 struct face *face = FACE_FROM_ID_OR_NULL (f, face_id);
1306 1310
1307 block_input (); 1311 block_input ();
1308 1312
@@ -1365,7 +1369,11 @@ x_after_update_window_line (struct window *w, struct glyph_row *desired_row)
1365 height > 0)) 1369 height > 0))
1366 { 1370 {
1367 int y = WINDOW_TO_FRAME_PIXEL_Y (w, max (0, desired_row->y)); 1371 int y = WINDOW_TO_FRAME_PIXEL_Y (w, max (0, desired_row->y));
1368 struct face *face = FACE_FROM_ID_OR_NULL (f, INTERNAL_BORDER_FACE_ID); 1372 int face_id =
1373 !NILP (Vface_remapping_alist)
1374 ? lookup_basic_face (NULL, f, INTERNAL_BORDER_FACE_ID)
1375 : INTERNAL_BORDER_FACE_ID;
1376 struct face *face = FACE_FROM_ID_OR_NULL (f, face_id);
1369 1377
1370 block_input (); 1378 block_input ();
1371 if (face) 1379 if (face)