From: Po Lu Date: Fri, 4 Mar 2022 01:11:36 +0000 (+0800) Subject: * src/pgtkterm.c (pgtk_draw_fringe_bitmap): Synchronize logic with X. X-Git-Tag: emacs-29.0.90~2029 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=cba88c275bb2abbd65837fb27530655b0222b62b;p=emacs.git * src/pgtkterm.c (pgtk_draw_fringe_bitmap): Synchronize logic with X. --- diff --git a/src/pgtkterm.c b/src/pgtkterm.c index 7855b7053ab..ce167fdac2f 100644 --- a/src/pgtkterm.c +++ b/src/pgtkterm.c @@ -3573,10 +3573,23 @@ pgtk_draw_fringe_bitmap (struct window *w, struct glyph_row *row, } } - if (p->which && p->which < max_fringe_bmp) + if (p->which + && p->which < max_fringe_bmp + && p->which < max_used_fringe_bitmap) { Emacs_GC gcv; + if (!fringe_bmp[p->which]) + { + /* This fringe bitmap is known to fringe.c, but lacks the + cairo_pattern_t pattern which shadows that bitmap. This + is typical to define-fringe-bitmap being called when the + selected frame was not a GUI frame, for example, when + packages that define fringe bitmaps are loaded by a + daemon Emacs. Create the missing pattern now. */ + gui_define_fringe_bitmap (f, p->which); + } + gcv.foreground = (p->cursor_p ? (p->overlay_p ? face->background : FRAME_X_OUTPUT (f)->cursor_color)