Hacker News new | ask | show | jobs
by DonaldFisk 358 days ago
I understand that Wayland doesn't support Xlib function calls. What are the options for those of us who rely on C code which which uses Xlib for 2d graphics and event handling? If I have to switch to e.g. GTK, I'd not only have to rewrite all the Xlib calls, but all the code which depends on this, as Xlib and GTK do graphics ad events quite differently.
2 comments

XWayland is still supported, and afaik will be for some time. It's only standalone Xorg which isn't.
Thanks, this might be what I'm looking for. It's covered here: https://wayland.freedesktop.org/docs/html/ch05.html and https://www.mankier.com/1/Xwayland
Ariadne Conill is turning Xwayland into a full X11 replacement: https://github.com/kaniini/wayback. She doesn't want to maintain it long-term, so if you're interested in contributing, please do: the more people understand the codebase, the better.
Isn't libwayland-client the replacement?

E.g. you now use the wayland calls instead of x11 calls

Specifically, I mean functions such as XCreateSimpleWindow, XDrawRectangle, XDrawArc, XmbDrawString, XNextEvent, etc.