Under GNOME the gsd-xsettings plugin of gnome-settings-daemon runs the scripts under /etc/xdg/Xwayland-session.d after Xwayland starts. Under Fedora this is needed by at-spi to enable X11 apps to use at-spi, without which its accessibility features are unavailable (https://bugzilla.redhat.com/show_bug.cgi?id=1821345). Not sure if kwin the right product. I'm putting it here because Xwayland is launched by kwin_wayland. The Redhat bug for this is https://bugzilla.redhat.com/show_bug.cgi?id=1961411
Makes sense. Probably best done by startplasma-wayland which is run once X11 things are up.
We've moved to systemd units, we don't need horrible scripts anymore