
What's the proper way to determine that you are speaking to XWayland rather than Xorg? Is it really "pick one of half a dozen possible environment variables and pray"?
It is software malpractice that the XWayland X server doesn't identify itself via Vendor String, or the presence of extension or something.