GNOME Bugzilla – Bug 699578
Implement foreign surface support for stages
Last modified: 2013-07-23 17:25:21 UTC
Created attachment 243177 [details] [review] Proposed implementation for ClutterStage foreign surface surface This would allow you to provide a Wayland surface to associate with a ClutterStage, rather than having Cogl create the surface and then associating it with a toplevel shell surface.
Review of attachment 243177 [details] [review]: LGTM. ebassi?
Review of attachment 243177 [details] [review]: looks good, in general. it still needs to update the API reference bits under doc/reference/clutter. ::: clutter/wayland/clutter-stage-wayland.c @@ +303,3 @@ + * platform. Calling this function at any other time has no effect. + * + * Since: 1.14 Since: 1.16 ::: clutter/wayland/clutter-wayland.h @@ +44,3 @@ struct wl_shell_surface *clutter_wayland_stage_get_wl_shell_surface (ClutterStage *stage); struct wl_surface *clutter_wayland_stage_get_wl_surface (ClutterStage *stage); +void clutter_wayland_stage_set_wl_surface (ClutterStage *stage, struct wl_surface *surface); needs the CLUTTER_AVAILABLE_IN_1_16 annotation. to be fair, all the other functions in the header need an annotation, but that ought to be a separate bug.
Created attachment 244067 [details] [review] [1/6] wayland: Add API version Thanks for the reviews, I've made the suggested modifications. Updating the reference docs spiraled into a small patchset in its own right, the last of which (6/6) is the modified foreign surface implementation.
Created attachment 244068 [details] [review] clutter-stage-wayland: Pedantic typo fix Minor typo fix in gtk-doc directive.
Created attachment 244069 [details] [review] [3/6] docs: Remove empty line before parameter tags These parameter docs were not being picked up due do to empty lines.
Created attachment 244070 [details] [review] [4/6] clutter-input-device-wayland: Update indentifier name This function name had fallen out of date.
Created attachment 244072 [details] [review] [5/6] docs: Add clutter-wayland section to reference docs Adds the stray clutter-wayland section to the reference documentation.
Created attachment 244073 [details] [review] [6/6] wayland: Add foreign surface support to stage Updated proposed implementation for ClutterStage foreign surface support, incorporating Emmanuele's suggested changes.
Review of attachment 244067 [details] [review]: looks good.
Review of attachment 244068 [details] [review]: sure :-)
Review of attachment 244069 [details] [review]: sure.
Review of attachment 244070 [details] [review]: looks good.
Review of attachment 244072 [details] [review]: looks good.
Review of attachment 244073 [details] [review]: looks good.
I'd like to see a test using the new API but i'll go ahead and merge the documentation fixes to master and 1.16. When the API change is tested we can pull it in.
Review of attachment 244067 [details] [review]: Committed.
Review of attachment 244068 [details] [review]: Committed.
Review of attachment 244069 [details] [review]: Committed.
Review of attachment 244070 [details] [review]: Committed.
Review of attachment 244072 [details] [review]: Committed.
Created attachment 249228 [details] [review] wayland: Add foreign surface support to stage This adds support for optionally a providing a foreign Wayland surface to a ClutterStage before it is first show. Setting a foreign surface prevents Cogl from allocating a surface and shell surface for the stage automatically. v2: add CLUTTER_AVAILABLE_IN_1_16 annotation and API reference docs (review from Emmanuele Bassi) v3: set a boolean to indicate that this stage is using a foreign surface (Rob Bradford)
Created attachment 249229 [details] [review] wayland: Only create and act on shell_surface for non-foreign surfaces We should not create a shell surface and set the role for that shell surface if the surface was a foreign one provided through clutter_wayland_set_wl_surface
Hi Emmanuele, can you give these two new patches a quick glance to check they're doing it how you'd expect.
ebassi, do you have any feedback on these two patches.
Review of attachment 249228 [details] [review]: looks good.
Review of attachment 249229 [details] [review]: looks good.
Attachment 249228 [details] pushed as b6d2232 - wayland: Add foreign surface support to stage Attachment 249229 [details] pushed as 7153863 - wayland: Only create and act on shell_surface for non-foreign surfaces