Preserve the correct a11y tree in GtkStack
authorLukáš Tyrychtr <lukastyrychtr@gmail.com>
Tue, 14 Feb 2023 13:44:20 +0000 (14:44 +0100)
committerLukáš Tyrychtr <lukastyrychtr@gmail.com>
Tue, 14 Feb 2023 13:44:20 +0000 (14:44 +0100)
Now, when we can, ensure that the GtkStackPage is the parent of its widget.

gtk/gtkstack.c

index 64bc3ae7d054bb405d9087523e5fcac5adc0d65e..025bd663c7eb78363d95313ed68af00fec5faaa1 100644 (file)
@@ -410,6 +410,10 @@ gtk_stack_page_set_property (GObject      *object,
     {
     case CHILD_PROP_CHILD:
       g_set_object (&info->widget, g_value_get_object (value));
+      gtk_accessible_set_accessible_parent (
+        GTK_ACCESSIBLE (info->widget),
+        GTK_ACCESSIBLE (info),
+        NULL);
       break;
 
     case CHILD_PROP_NAME: