GNOME Bugzilla – Bug 703566
Need to be able to share Wayland display between GTK and Clutter
Last modified: 2013-07-09 11:36:07 UTC
This allows the reuse of the display connection and hence objects with existing code that is using Wayland.
Created attachment 248340 [details] [review] wayland: add support for connecting to a foreign display
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.
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
Attachment 248340 [details] pushed as 8df5aba - wayland: add support for connecting to a foreign display