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

@@ -1174,7 +1174,8 @@ data_device_start_drag (struct wl_client *client,
if (icon_resource &&
!meta_wayland_surface_assign_role (icon_surface,
META_TYPE_WAYLAND_SURFACE_ROLE_DND))
META_TYPE_WAYLAND_SURFACE_ROLE_DND,
NULL))
{
wl_resource_post_error (resource, WL_DATA_DEVICE_ERROR_ROLE,
"wl_surface@%d already has a different role",