Example doesn’t work
The example doesn’t work (RuntimeError: no shell found) because wl_shell has been deprecated and is not exposed anymore in my compositor (Sway). xdg_wm_base must be used instead.
Have same problem with wlroots-based compositors
There's an extended C example for xdg_wm_base in the wayland book. I'm trying to transliterate the example, but in case I don't get there: https://wayland-book.com/libwayland/interfaces.html
It's not clear to me how to call xdg_surface_add_listener. Ideas?
I am not sure. I tried using dispatcher[] slot on the object, but I just get segfaults.