From 8875ae70a435358824e7f39b0c769c459e6a067e Mon Sep 17 00:00:00 2001 From: Po Lu Date: Wed, 5 Jan 2022 06:26:31 +0000 Subject: [PATCH] Simply conditions for mouse face display when drawing cursor on Haiku * src/haikuterm.c (haiku_draw_stretch_glyph_string): Simplify conditions for mouse face display. --- src/haikuterm.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/haikuterm.c b/src/haikuterm.c index 65c91bbd381..b8cb57a8fb0 100644 --- a/src/haikuterm.c +++ b/src/haikuterm.c @@ -1057,10 +1057,8 @@ haiku_draw_stretch_glyph_string (struct glyph_string *s) if (!face->stipple) { uint32_t bkg; - if (s->hl == DRAW_MOUSE_FACE || (s->hl == DRAW_CURSOR - && s->row->mouse_face_p - && cursor_in_mouse_face_p (s->w))) - haiku_mouse_face_colors (s, NULL, &bkg); + if (s->row->mouse_face_p && cursor_in_mouse_face_p (s->w)) + haiku_mouse_face_colors (s, NULL, &bkg); else bkg = face->background; @@ -1087,9 +1085,7 @@ haiku_draw_stretch_glyph_string (struct glyph_string *s) { void *view = FRAME_HAIKU_VIEW (s->f); uint32_t bkg; - if (s->hl == DRAW_MOUSE_FACE) - haiku_mouse_face_colors (s, NULL, &bkg); - else if (s->hl == DRAW_CURSOR) + if (s->hl == DRAW_CURSOR) bkg = FRAME_CURSOR_COLOR (s->f).pixel; else bkg = s->face->background; -- 2.39.2