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:
@ -767,7 +767,8 @@ xdg_shell_get_xdg_surface (struct wl_client *client,
|
||||
return;
|
||||
}
|
||||
|
||||
if (!meta_wayland_surface_assign_role (surface, META_TYPE_WAYLAND_XDG_SURFACE))
|
||||
if (!meta_wayland_surface_assign_role (surface, META_TYPE_WAYLAND_XDG_SURFACE,
|
||||
NULL))
|
||||
{
|
||||
wl_resource_post_error (resource, XDG_SHELL_ERROR_ROLE,
|
||||
"wl_surface@%d already has a different role",
|
||||
@ -821,7 +822,8 @@ xdg_shell_get_xdg_popup (struct wl_client *client,
|
||||
return;
|
||||
}
|
||||
|
||||
if (!meta_wayland_surface_assign_role (surface, META_TYPE_WAYLAND_XDG_POPUP))
|
||||
if (!meta_wayland_surface_assign_role (surface, META_TYPE_WAYLAND_XDG_POPUP,
|
||||
NULL))
|
||||
{
|
||||
wl_resource_post_error (resource, XDG_SHELL_ERROR_ROLE,
|
||||
"wl_surface@%d already has a different role",
|
||||
|
Reference in New Issue
Block a user