[backport to Xwayland-22.1] Couple of fixes

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

Merge request reports