Tbh, I haven’t used libwayland-client enough to confidently put it ahead of xlib, but xlib holds a lot of quirks and window requests are not straightforward, especially if you need to keep track of windows and verify changes made to them. There isn’t a full proof way of verifying windows requests as ConfigureNotify events are detached from window change requests. Also XGetImage internally allocating memory was a pretty annoying quirk, I know XGetSubimage fixes this problem, but XGetImage allocating its own memory is unnecessary in the first place. I think this is all very much intertwined with the design philosophy back when they first designed X11, from what I’ve seen Wayland and it’s libraries don’t have them same problems. Maybe if you or someone else has found similar bugs when attempting more complex projects with Wayland lib and can comment on this, I would say otherwise.
I find working with xlib to be simpler and easier for creating window managers than libwayland-client imo.
Tbh, I haven’t used libwayland-client enough to confidently put it ahead of xlib, but xlib holds a lot of quirks and window requests are not straightforward, especially if you need to keep track of windows and verify changes made to them. There isn’t a full proof way of verifying windows requests as ConfigureNotify events are detached from window change requests. Also XGetImage internally allocating memory was a pretty annoying quirk, I know XGetSubimage fixes this problem, but XGetImage allocating its own memory is unnecessary in the first place. I think this is all very much intertwined with the design philosophy back when they first designed X11, from what I’ve seen Wayland and it’s libraries don’t have them same problems. Maybe if you or someone else has found similar bugs when attempting more complex projects with Wayland lib and can comment on this, I would say otherwise.