From: Eli Zaretskii Date: Sat, 26 Oct 2024 08:18:41 +0000 (+0300) Subject: Adapt w32 console to tty-child-frame changes X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=5304d4917f0417a3a5b8bedb44bda1e00fcff67b;p=emacs.git Adapt w32 console to tty-child-frame changes * src/w32console.c (w32con_write_glyphs): Use the glyph's frame, not the root frame, to resolve faces from face IDs. (cherry picked from commit 33586db3d34bcbe6441d98542df2b3370a1e2622) --- diff --git a/src/w32console.c b/src/w32console.c index 7dcbc795cac..b9a84bbf86a 100644 --- a/src/w32console.c +++ b/src/w32console.c @@ -327,14 +327,19 @@ w32con_write_glyphs (struct frame *f, register struct glyph *string, { /* Identify a run of glyphs with the same face. */ int face_id = string->face_id; + /* Since this is called to deliver the frame glyph matrix to the + glass, some of the glyphs might be from a child frame, which + affects the interpretation of face ID. */ + struct frame *face_id_frame = string->frame ? string->frame : f; int n; for (n = 1; n < len; ++n) - if (string[n].face_id != face_id) + if (!(string[n].face_id == face_id + && string[n].frame == face_id_frame)) break; /* Turn appearance modes of the face of the run on. */ - char_attr = w32_face_attributes (f, face_id); + char_attr = w32_face_attributes (face_id_frame, face_id); if (n == len) /* This is the last run. */