From: Eli Zaretskii Date: Sat, 9 Mar 2019 17:45:13 +0000 (+0200) Subject: Consult 'face-remapping-alist' for 'internal-border' face X-Git-Tag: emacs-27.0.90~3448 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=9fe7f233597d8a6ac72a61e1fb197e45a8c73370;p=emacs.git 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. --- 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) /* Clear border if it's larger than before. */ if (border != 0) { - HDC hdc = get_frame_dc (f); int width = FRAME_PIXEL_WIDTH (f); int height = FRAME_PIXEL_HEIGHT (f); - struct face *face = FACE_FROM_ID_OR_NULL (f, INTERNAL_BORDER_FACE_ID); + int face_id = + !NILP (Vface_remapping_alist) + ? lookup_basic_face (NULL, f, INTERNAL_BORDER_FACE_ID) + : INTERNAL_BORDER_FACE_ID; + struct face *face = FACE_FROM_ID_OR_NULL (f, face_id); block_input (); + HDC hdc = get_frame_dc (f); if (face) { /* 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) height > 0)) { int y = WINDOW_TO_FRAME_PIXEL_Y (w, max (0, desired_row->y)); + int face_id = + !NILP (Vface_remapping_alist) + ? lookup_basic_face (NULL, f, INTERNAL_BORDER_FACE_ID) + : INTERNAL_BORDER_FACE_ID; + struct face *face = FACE_FROM_ID_OR_NULL (f, face_id); block_input (); - { - HDC hdc = get_frame_dc (f); - struct face *face = FACE_FROM_ID_OR_NULL (f, INTERNAL_BORDER_FACE_ID); - if (face) - { - /* Fill border with internal border face. */ - unsigned long color = face->background; + HDC hdc = get_frame_dc (f); + if (face) + { + /* Fill border with internal border face. */ + unsigned long color = face->background; + + w32_fill_area (f, hdc, color, 0, y, width, height); + w32_fill_area (f, hdc, color, FRAME_PIXEL_WIDTH (f) - width, + y, width, height); + } + else + { + w32_clear_area (f, hdc, 0, y, width, height); + w32_clear_area (f, hdc, FRAME_PIXEL_WIDTH (f) - width, + y, width, height); + } + release_frame_dc (f, hdc); - w32_fill_area (f, hdc, color, 0, y, width, height); - w32_fill_area (f, hdc, color, FRAME_PIXEL_WIDTH (f) - width, - y, width, height); - } - else - { - w32_clear_area (f, hdc, 0, y, width, height); - w32_clear_area (f, hdc, FRAME_PIXEL_WIDTH (f) - width, - y, width, height); - } - release_frame_dc (f, hdc); - } unblock_input (); } } 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) #else int margin = FRAME_TOP_MARGIN_HEIGHT (f); #endif - struct face *face = FACE_FROM_ID_OR_NULL (f, INTERNAL_BORDER_FACE_ID); + int face_id = + !NILP (Vface_remapping_alist) + ? lookup_basic_face (NULL, f, INTERNAL_BORDER_FACE_ID) + : INTERNAL_BORDER_FACE_ID; + struct face *face = FACE_FROM_ID_OR_NULL (f, face_id); block_input (); @@ -1365,7 +1369,11 @@ x_after_update_window_line (struct window *w, struct glyph_row *desired_row) height > 0)) { int y = WINDOW_TO_FRAME_PIXEL_Y (w, max (0, desired_row->y)); - struct face *face = FACE_FROM_ID_OR_NULL (f, INTERNAL_BORDER_FACE_ID); + int face_id = + !NILP (Vface_remapping_alist) + ? lookup_basic_face (NULL, f, INTERNAL_BORDER_FACE_ID) + : INTERNAL_BORDER_FACE_ID; + struct face *face = FACE_FROM_ID_OR_NULL (f, face_id); block_input (); if (face)