These two patches are cherry-picks of !6120 (merged) with minor fixups to the gtk-4-10 branch.
gtk-4-10