]> git.eshelyaron.com Git - emacs.git/commitdiff
Adapt w32 console to tty-child-frame changes
authorEli Zaretskii <eliz@gnu.org>
Sat, 26 Oct 2024 08:18:41 +0000 (11:18 +0300)
committerEshel Yaron <me@eshelyaron.com>
Mon, 23 Dec 2024 14:53:35 +0000 (15:53 +0100)
* 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)

src/w32console.c

index 7dcbc795cac4357ba5daed02dc979ae1897ac74f..b9a84bbf86afec62f7601abfb3ed7f09f0b46522 100644 (file)
@@ -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.  */