XRoar on Wayland
To the best of my knowledge, a GTK+ 3 build of XRoar will run on Wayland desktops, but it does so by forcing the use of the X11 backend. This is purely because:
- gdk_x11_get_default_xdisplay() seemingly returns a non-NULL junk pointer if not running with the X11 backend (discussion here).
- This pointer is used to query keyboard layout information. When the pointer is junk, XRoar will crash.
- The easy alternative to forcing GTK+ 3 to use the X11 backend is to not support the keyboard layout handling at all, so this seemed like the least worst option.
Doubtless I could query the backend and use Wayland-specific keyboard queries, but I've not got around to that yet and unfortunately I'm unlikely to because:
- I use KiCad quite a lot, and there are many reported issues with KiCad under Wayland.
- I use my own X11 Window Manager. As I understand it, to implement your own window management behaviour under Wayland, you have to implement a whole compositor. Possibly there are even then behaviours dictated by Wayland that you can't override (e.g. client-side decorations).
- Time, time, time. And inclination. But also time.
If there are XRoar-using Wayland programming experts out there, I'll happily incorporate patches. I think you'd only need to be looking at the GTK+ 3 UI code (src/gtk3/) and be providing equivalents to the X11 low-level keyboard scanning stuff in src/x11/.