with Qt 5.12 it is possible to run FreeCAD natively under Wayland. All window decorations are nicely drawn. It is also crisper on HiDPI displays because scaling is handled better. I had to hack the Coin3d build to prevent the linking with libglx, because otherwise FreeCAD would crash as soon as a new document is created or opened.

It was quite easy. Coin works without glx for FreeCAD probably because the funtionality is not needed by FreeCAD and Coin has a dummy implementation. I just had to add a patch to the Arch build recipy:https://aur.archlinux.org/packages/coin-hg/

I tried to add some runtime workarounds in FreeCAD but this is awkward and probably doomed. Coin probably needs to use EGL instead of GLX. I will check if there is an easy solution and contact the Coin team.

That would be great. Likely still a few years before Wayland becomes more widely used and majority of applications add support. But FreeCAD providing support should happen sooner rather than later. If possible. Therefore Coin3D needs to get adapted and as for the Qt. You likely had to use QtWayland module in the procedure somehow? Can Wayland/X11 option be set with an environment variable before starting FreeCAD?

I tried to add some runtime workarounds in FreeCAD but this is awkward and probably doomed. Coin probably needs to use EGL instead of GLX. I will check if there is an easy solution and contact the Coin team.