This is the gtk3 counterpart of !2830 (merged). See commit message for detail.
This will create a new commit in order to revert the existing changes.