]> git.eshelyaron.com Git - emacs.git/commitdiff
Simply conditions for mouse face display when drawing cursor on Haiku
authorPo Lu <luangruo@yahoo.com>
Wed, 5 Jan 2022 06:26:31 +0000 (06:26 +0000)
committerPo Lu <luangruo@yahoo.com>
Wed, 5 Jan 2022 06:26:31 +0000 (06:26 +0000)
* src/haikuterm.c (haiku_draw_stretch_glyph_string): Simplify
conditions for mouse face display.

src/haikuterm.c

index 65c91bbd381ed65b6d83bf4a0eedeb10ac49ebbf..b8cb57a8fb09d2d60ed254c6609385d38f7d5bd0 100644 (file)
@@ -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;