From: Po Lu Date: Thu, 3 Feb 2022 01:57:00 +0000 (+0000) Subject: Fix display of text decorations with defaulted foreground on Haiku X-Git-Tag: emacs-29.0.90~2565 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=11ee58de9db67ff2431d243fd7ab83ea8f417cb5;p=emacs.git Fix display of text decorations with defaulted foreground on Haiku * src/haikuterm.c (haiku_draw_text_decoration): Remove parameter `dcol' and use face->foreground instead. All callers changed. --- diff --git a/src/haikuterm.c b/src/haikuterm.c index c25e73f8c1a..a007aeaba66 100644 --- a/src/haikuterm.c +++ b/src/haikuterm.c @@ -601,7 +601,7 @@ haiku_draw_underwave (struct glyph_string *s, int width, int x) static void haiku_draw_text_decoration (struct glyph_string *s, struct face *face, - uint8_t dcol, int width, int x) + int width, int x) { if (s->for_overlaps) return; @@ -616,7 +616,7 @@ haiku_draw_text_decoration (struct glyph_string *s, struct face *face, else if (!face->underline_defaulted_p) BView_SetHighColor (view, face->underline_color); else - BView_SetHighColor (view, dcol); + BView_SetHighColor (view, face->foreground); if (face->underline == FACE_UNDER_WAVE) haiku_draw_underwave (s, width, x); @@ -713,7 +713,7 @@ haiku_draw_text_decoration (struct glyph_string *s, struct face *face, else if (!face->overline_color_defaulted_p) BView_SetHighColor (view, face->overline_color); else - BView_SetHighColor (view, dcol); + BView_SetHighColor (view, face->foreground); BView_FillRectangle (view, s->x, s->y + dy, s->width, h); } @@ -737,7 +737,7 @@ haiku_draw_text_decoration (struct glyph_string *s, struct face *face, else if (!face->strike_through_color_defaulted_p) BView_SetHighColor (view, face->strike_through_color); else - BView_SetHighColor (view, dcol); + BView_SetHighColor (view, face->foreground); BView_FillRectangle (view, s->x, glyph_y + dy, s->width, h); } @@ -814,7 +814,7 @@ haiku_draw_string_box (struct glyph_string *s, int clip_p) { void *view = FRAME_HAIKU_VIEW (s->f); - haiku_draw_text_decoration (s, face, face->foreground, s->width, s->x); + haiku_draw_text_decoration (s, face, s->width, s->x); BView_ClipToInverseRect (view, left_x, top_y, right_x - left_x + 1, hwidth); if (left_p) BView_ClipToInverseRect (view, left_x, top_y, vwidth, bottom_y - top_y + 1); @@ -1561,8 +1561,7 @@ haiku_draw_glyph_string (struct glyph_string *s) if (!box_filled_p && face->box != FACE_NO_BOX) haiku_draw_string_box (s, 1); else - haiku_draw_text_decoration (s, face, face->foreground, - s->width, s->x); + haiku_draw_text_decoration (s, face, s->width, s->x); if (s->prev) {