Created attachment 166414 [details] x11-optional.patch At this point we shouldn't be assuming that just because linux is the platform that X11 libraries are going to exist. Here is patch to offer better full wayland support where no X11 libs exist
Please submit the patch on invent.kde.org. I think there is things wrong (if built with x11 support and run under wayland; probably the most normal case), but it is better to discuss on invent.
Thanks for your report. Indeed invent.kde.org is the way to go and get proper review. I have submitted quite a few MRs upstream like yours, you can have a look in https://bugs.gentoo.org/813450 for inspiration.