emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 8875ae70a4: Simply conditions for mouse face display when drawing


From: Po Lu
Subject: master 8875ae70a4: Simply conditions for mouse face display when drawing cursor on Haiku
Date: Wed, 5 Jan 2022 01:30:05 -0500 (EST)

branch: master
commit 8875ae70a435358824e7f39b0c769c459e6a067e
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>

    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 65c91bbd38..b8cb57a8fb 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;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]