From 6fa5f0cbbc341a054d0dd41d54addb55748f233f Mon Sep 17 00:00:00 2001 From: Po Lu Date: Mon, 8 Nov 2021 01:16:29 +0100 Subject: [PATCH] Set clipping when dumping stretch glyphs in some cases * src/nsterm.m (ns_draw_glyph_string): Always focus even when dumping stretch glyphs in s->next (bug#51653). --- src/nsterm.m | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/nsterm.m b/src/nsterm.m index 9409697b135..ed0e7a2aae8 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -3991,17 +3991,17 @@ ns_draw_glyph_string (struct glyph_string *s) width += next->width, next = next->next) if (next->first_glyph->type != IMAGE_GLYPH) { + n = ns_get_glyph_string_clip_rect (s->next, r); + ns_focus (s->f, r, n); if (next->first_glyph->type != STRETCH_GLYPH) { - n = ns_get_glyph_string_clip_rect (s->next, r); - ns_focus (s->f, r, n); ns_maybe_dumpglyphs_background (s->next, 1); - ns_unfocus (s->f); } else { ns_dumpglyphs_stretch (s->next); } + ns_unfocus (s->f); next->num_clips = 0; } } -- 2.39.2