Commit 9fe7f233 authored by Eli Zaretskii's avatar Eli Zaretskii

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.
parent 21f54fee
......@@ -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. */
......
......@@ -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 ();
}
}
......
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment