71b4c0ee02
This is just used in the native backend, move it to an utility function there. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1403>