Subject: Re: bug#55779: 29.0.50; child frame

From: Po Lu <[email-masked]>
Date: Sun, 05 Jun 2022 10:54:53 +0800

drshapeless <[email-masked]> writes:

> If I comment this part out, even at the lastest master commit, the issue
> is solved. I could say these few lines of code is the root of the bug.
>
> I have no idea what is going on though.

Thanks.  I didn't quite figure that out either.

Does this also fix the problem?

diff --git a/src/xterm.c b/src/xterm.c
index 2bf37e94d6..7f9d4c6ff6 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -4349,11 +4349,16 @@ x_update_opaque_region (struct frame *f, XEvent *configure)
 		     (unsigned char *) &opaque_region, 4);
   else
     {
-      object_class = G_OBJECT_GET_CLASS (FRAME_GTK_OUTER_WIDGET (f));
-      class = GTK_WIDGET_CLASS (object_class);
+      /* This causes child frames to not update correctly for an
+	 unknown reason.  (bug#55779) */
+      if (!FRAME_PARENT_FRAME (f))
+	{
+	  object_class = G_OBJECT_GET_CLASS (FRAME_GTK_OUTER_WIDGET (f));
+	  class = GTK_WIDGET_CLASS (object_class);
 
-      if (class->style_updated)
-	class->style_updated (FRAME_GTK_OUTER_WIDGET (f));
+	  if (class->style_updated)
+	    class->style_updated (FRAME_GTK_OUTER_WIDGET (f));
+	}
     }
 #endif
   unblock_input ();