[Backport to Xwayland 21.1] Couple of commits to fix issues in Xwayland 21.1

Merged Olivier Fourdan requested to merge ofourdan/xserver:xwayland-21.1-backports into xwayland-21.1

Couple of backports for Xwayland 21.1 (previous Xwayland standalone branch):

This adds:

Merge request reports