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 703566 - Need to be able to share Wayland display between GTK and Clutter
Need to be able to share Wayland display between GTK and Clutter
Status: RESOLVED FIXED
Product: clutter
Classification: Platform
Component: wayland
unspecified
Other All
: Normal normal
: ---
Assigned To: clutter-maint
clutter-maint
Depends on:
Blocks:
 
 
Reported: 2013-07-03 17:52 UTC by Rob Bradford
Modified: 2013-07-09 11:36 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
wayland: add support for connecting to a foreign display (3.32 KB, patch)
2013-07-03 17:52 UTC, Rob Bradford
committed Details | Review

Description Rob Bradford 2013-07-03 17:52:47 UTC
This allows the reuse of the display connection and hence objects with
existing code that is using Wayland.
Comment 1 Rob Bradford 2013-07-03 17:52:49 UTC
Created attachment 248340 [details] [review]
wayland: add support for connecting to a foreign display
Comment 2 Emmanuele Bassi (:ebassi) 2013-07-03 18:25:13 UTC
Review of attachment 248340 [details] [review]:

looks good to me, apart from two minor coding style issues.

also, remember to add the function to clutter.symbols and to the API reference before pushing.

::: clutter/wayland/clutter-backend-wayland.c
@@ +180,3 @@
   /* TODO: expose environment variable/commandline option for this... */
+  backend_wayland->wayland_display = _foreign_display;
+  if (!backend_wayland->wayland_display)

please, use explicit NULL comparison, as per coding style.

::: clutter/wayland/clutter-wayland.h
@@ +51,3 @@
+
+CLUTTER_AVAILABLE_IN_1_16
+void clutter_wayland_set_display (struct wl_display *display);

missing space between the function and G_END_DECLS.
Comment 3 Neil Roberts 2013-07-04 14:11:46 UTC
Just to note, as far as I understand from talking with Robert, to get this to work we'll also need to be able to disable Cogl's Wayland event dispatching so that it won't fight with GTK over reading the Wayland socket. I made a patch to add API for this on the Cogl mailing list. It would be good to have a patch in Clutter to wrap this API up.

http://lists.freedesktop.org/archives/cogl/2013-July/001310.html
Comment 4 Rob Bradford 2013-07-09 11:36:04 UTC
Attachment 248340 [details] pushed as 8df5aba - wayland: add support for connecting to a foreign display