]> git.eshelyaron.com Git - emacs.git/commitdiff
Set clipping when dumping stretch glyphs in some cases
authorPo Lu <luangruo@yahoo.com>
Mon, 8 Nov 2021 00:16:29 +0000 (01:16 +0100)
committerLars Ingebrigtsen <larsi@gnus.org>
Mon, 8 Nov 2021 00:16:29 +0000 (01:16 +0100)
* src/nsterm.m (ns_draw_glyph_string): Always focus even when dumping
stretch glyphs in s->next (bug#51653).

src/nsterm.m

index 9409697b13586da6c5dbabc4852c90611517f6a3..ed0e7a2aae82a8b55dbef31028d4c7ccd1e8deb6 100644 (file)
@@ -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;
           }
     }