xdg-shell: Take a xdg_surface as the parent surface

There is no other valid surface that we should be using here.

Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
This commit is contained in:
Jasper St. Pierre
2015-02-13 14:01:55 +08:00
committed by Pekka Paalanen
parent 502f5e06a2
commit 66bc949b72
3 changed files with 14 additions and 14 deletions
+6 -6
View File
@@ -3717,14 +3717,14 @@ xdg_surface_set_parent(struct wl_client *client,
struct wl_resource *parent_resource)
{
struct shell_surface *shsurf = wl_resource_get_user_data(resource);
struct weston_surface *parent;
struct shell_surface *parent;
if (parent_resource)
if (parent_resource) {
parent = wl_resource_get_user_data(parent_resource);
else
parent = NULL;
shell_surface_set_parent(shsurf, parent);
shell_surface_set_parent(shsurf, parent->surface);
} else {
shell_surface_set_parent(shsurf, NULL);
}
}
static void