]> git.eshelyaron.com Git - emacs.git/commitdiff
Don't make cursors affected by background alpha on PGTK
authorPo Lu <luangruo@yahoo.com>
Fri, 11 Feb 2022 05:59:03 +0000 (13:59 +0800)
committerPo Lu <luangruo@yahoo.com>
Fri, 11 Feb 2022 05:59:03 +0000 (13:59 +0800)
* src/ftcrfont.c (ftcrfont_draw):
* src/pgtkterm.c (x_clear_glyph_string_rect): Make behavior on
PGTK consistent with X.

src/ftcrfont.c
src/pgtkterm.c

index 4d1ecee3788e99ca63a132f495716d9060df944e..98a28af5f22be8f78b54b56a8eac85fa67d5c18b 100644 (file)
@@ -568,7 +568,8 @@ ftcrfont_draw (struct glyph_string *s,
 #ifdef HAVE_X_WINDOWS
       x_set_cr_source_with_gc_background (f, s->gc, s->hl != DRAW_CURSOR);
 #else
-      pgtk_set_cr_source_with_color (f, s->xgcv.background, true);
+      pgtk_set_cr_source_with_color (f, s->xgcv.background,
+                                    s->hl != DRAW_CURSOR);
 #endif
 #else
       uint32_t col = be_background;
index 8faffe94d4241704d95886afc15224bc9e109f70..43c475f2a73aa9b9e81d8d8757d7be2aad82610c 100644 (file)
@@ -1197,7 +1197,9 @@ pgtk_compute_glyph_string_overhangs (struct glyph_string *s)
 static void
 x_clear_glyph_string_rect (struct glyph_string *s, int x, int y, int w, int h)
 {
-  pgtk_fill_rectangle (s->f, s->xgcv.background, x, y, w, h, true);
+  pgtk_fill_rectangle (s->f, s->xgcv.background, x, y, w, h,
+                      (s->first_glyph->type != STRETCH_GLYPH
+                       || s->hl != DRAW_CURSOR));
 }