diff options
| author | Po Lu | 2022-02-03 01:57:00 +0000 |
|---|---|---|
| committer | Po Lu | 2022-02-03 01:57:00 +0000 |
| commit | 11ee58de9db67ff2431d243fd7ab83ea8f417cb5 (patch) | |
| tree | 7482c1674f413e2a6404626cbb35f94b641ea016 /src | |
| parent | 60fe17c958bb74eab7cbabe596f2700adee8b6ce (diff) | |
| download | emacs-11ee58de9db67ff2431d243fd7ab83ea8f417cb5.tar.gz emacs-11ee58de9db67ff2431d243fd7ab83ea8f417cb5.zip | |
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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/haikuterm.c | 13 |
1 files changed, 6 insertions, 7 deletions
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) | |||
| 601 | 601 | ||
| 602 | static void | 602 | static void |
| 603 | haiku_draw_text_decoration (struct glyph_string *s, struct face *face, | 603 | haiku_draw_text_decoration (struct glyph_string *s, struct face *face, |
| 604 | uint8_t dcol, int width, int x) | 604 | int width, int x) |
| 605 | { | 605 | { |
| 606 | if (s->for_overlaps) | 606 | if (s->for_overlaps) |
| 607 | return; | 607 | return; |
| @@ -616,7 +616,7 @@ haiku_draw_text_decoration (struct glyph_string *s, struct face *face, | |||
| 616 | else if (!face->underline_defaulted_p) | 616 | else if (!face->underline_defaulted_p) |
| 617 | BView_SetHighColor (view, face->underline_color); | 617 | BView_SetHighColor (view, face->underline_color); |
| 618 | else | 618 | else |
| 619 | BView_SetHighColor (view, dcol); | 619 | BView_SetHighColor (view, face->foreground); |
| 620 | 620 | ||
| 621 | if (face->underline == FACE_UNDER_WAVE) | 621 | if (face->underline == FACE_UNDER_WAVE) |
| 622 | haiku_draw_underwave (s, width, x); | 622 | haiku_draw_underwave (s, width, x); |
| @@ -713,7 +713,7 @@ haiku_draw_text_decoration (struct glyph_string *s, struct face *face, | |||
| 713 | else if (!face->overline_color_defaulted_p) | 713 | else if (!face->overline_color_defaulted_p) |
| 714 | BView_SetHighColor (view, face->overline_color); | 714 | BView_SetHighColor (view, face->overline_color); |
| 715 | else | 715 | else |
| 716 | BView_SetHighColor (view, dcol); | 716 | BView_SetHighColor (view, face->foreground); |
| 717 | 717 | ||
| 718 | BView_FillRectangle (view, s->x, s->y + dy, s->width, h); | 718 | BView_FillRectangle (view, s->x, s->y + dy, s->width, h); |
| 719 | } | 719 | } |
| @@ -737,7 +737,7 @@ haiku_draw_text_decoration (struct glyph_string *s, struct face *face, | |||
| 737 | else if (!face->strike_through_color_defaulted_p) | 737 | else if (!face->strike_through_color_defaulted_p) |
| 738 | BView_SetHighColor (view, face->strike_through_color); | 738 | BView_SetHighColor (view, face->strike_through_color); |
| 739 | else | 739 | else |
| 740 | BView_SetHighColor (view, dcol); | 740 | BView_SetHighColor (view, face->foreground); |
| 741 | 741 | ||
| 742 | BView_FillRectangle (view, s->x, glyph_y + dy, s->width, h); | 742 | BView_FillRectangle (view, s->x, glyph_y + dy, s->width, h); |
| 743 | } | 743 | } |
| @@ -814,7 +814,7 @@ haiku_draw_string_box (struct glyph_string *s, int clip_p) | |||
| 814 | { | 814 | { |
| 815 | void *view = FRAME_HAIKU_VIEW (s->f); | 815 | void *view = FRAME_HAIKU_VIEW (s->f); |
| 816 | 816 | ||
| 817 | haiku_draw_text_decoration (s, face, face->foreground, s->width, s->x); | 817 | haiku_draw_text_decoration (s, face, s->width, s->x); |
| 818 | BView_ClipToInverseRect (view, left_x, top_y, right_x - left_x + 1, hwidth); | 818 | BView_ClipToInverseRect (view, left_x, top_y, right_x - left_x + 1, hwidth); |
| 819 | if (left_p) | 819 | if (left_p) |
| 820 | BView_ClipToInverseRect (view, left_x, top_y, vwidth, bottom_y - top_y + 1); | 820 | 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) | |||
| 1561 | if (!box_filled_p && face->box != FACE_NO_BOX) | 1561 | if (!box_filled_p && face->box != FACE_NO_BOX) |
| 1562 | haiku_draw_string_box (s, 1); | 1562 | haiku_draw_string_box (s, 1); |
| 1563 | else | 1563 | else |
| 1564 | haiku_draw_text_decoration (s, face, face->foreground, | 1564 | haiku_draw_text_decoration (s, face, s->width, s->x); |
| 1565 | s->width, s->x); | ||
| 1566 | 1565 | ||
| 1567 | if (s->prev) | 1566 | if (s->prev) |
| 1568 | { | 1567 | { |