After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 692851 - wayland backend & compositor support can't be built together
wayland backend & compositor support can't be built together
Status: RESOLVED FIXED
Product: clutter
Classification: Platform
Component: wayland
git master
Other Linux
: Normal normal
: ---
Assigned To: clutter-maint
clutter-maint
Depends on:
Blocks:
 
 
Reported: 2013-01-30 00:55 UTC by Daniel Stone
Modified: 2013-02-20 23:35 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
wayland-compositor: Don't use Wayland types in public API (1.77 KB, patch)
2013-01-30 00:55 UTC, Daniel Stone
committed Details | Review
wayland: Only include Wayland headers in private (6.99 KB, patch)
2013-01-30 00:55 UTC, Daniel Stone
committed Details | Review

Description Daniel Stone 2013-01-30 00:55:10 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.
Comment 1 Daniel Stone 2013-01-30 00:55:47 UTC
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>
Comment 2 Daniel Stone 2013-01-30 00:55:54 UTC
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>
Comment 3 Emmanuele Bassi (:ebassi) 2013-02-20 23:35:49 UTC
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