[Backport to xwayland-23.1] The current fixes from the master branch

Merged Olivier Fourdan requested to merge ofourdan/xserver:backport-xwayland-23.1 into xwayland-23.1

This backports:

Merge request reports