From: Po Lu Date: Wed, 5 Jan 2022 06:26:31 +0000 (+0000) Subject: Simply conditions for mouse face display when drawing cursor on Haiku X-Git-Tag: emacs-29.0.90~3248 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=8875ae70a435358824e7f39b0c769c459e6a067e;p=emacs.git 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. --- 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;