MetaWaylandSurface: Allow passing parameters when assigning role

Allow passing parameters (only GObject parameters supported for now) so
that role assignment can affect the paremeters set during construction.

If a role was already assigned when assigning, the passed parameters
are set using g_object_set_valist().

https://bugzilla.gnome.org/show_bug.cgi?id=769936
This commit is contained in:
Jonas Ådahl
2016-01-28 17:14:06 +08:00
parent 2114f2eb9f
commit 3b3f40a1aa
8 changed files with 106 additions and 11 deletions

View File

@@ -1005,7 +1005,8 @@ pointer_set_cursor (struct wl_client *client,
if (surface &&
!meta_wayland_surface_assign_role (surface,
META_TYPE_WAYLAND_SURFACE_ROLE_CURSOR))
META_TYPE_WAYLAND_SURFACE_ROLE_CURSOR,
NULL))
{
wl_resource_post_error (resource, WL_POINTER_ERROR_ROLE,
"wl_surface@%d already has a different role",