GNOME Bugzilla – Bug 692851
wayland backend & compositor support can't be built together
Last modified: 2013-02-20 23:35:54 UTC
When the Wayland client backend, and the Wayland compositor support, were both included, wayland-backend.h ultimately included both wayland-client.h and wayland-server.h, which led to disappointment and compile failure. The fix here is two-pronged: the Wayland client backend should never expose wayland-client.h types beyond clutter/wayland/, and since the compositor support only has one entry point, we can just change its type to be a void * rather than struct wl_display *. Sadly this does lose a little bit of type-safety, but otherwise we can't have that header included at the same time as wayland-client.h.
Created attachment 234788 [details] [review] wayland-compositor: Don't use Wayland types in public API The definition of wl_display differs between Wayland clients and servers, and it's unsafe to include both wayland-client.h and wayland-server.h at the same time. Fudge around this by making the compositor public API use void * rather than struct wl_display *. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Created attachment 234789 [details] [review] wayland: Only include Wayland headers in private As wayland-client.h and wayland-server.h can't be included together, split the Wayland backend file into clutter-backend-wayland.h, which only defines the types, and clutter-backend-wayland-priv.h, which actually uses the Wayland client types. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Attachment 234788 [details] pushed as b37b9d9 - wayland-compositor: Don't use Wayland types in public API Attachment 234789 [details] pushed as dfb1459 - wayland: Only include Wayland headers in private