mirror of
https://github.com/brl/mutter.git
synced 2024-11-22 08:00:42 -05:00
wayland/subsurface: Return NULL as toplevel if parent has no role
There is nothing stopping a subsurface from commiting its state before its parents role has been assigned. Thus, we need to handle meta_wayland_surface_get_toplevel() returning NULL for subsurfaces even on commit.
This commit is contained in:
parent
4cf14c41ef
commit
b3f27de710
@ -594,7 +594,10 @@ subsurface_role_get_toplevel (MetaWaylandSurfaceRole *surface_role)
|
|||||||
meta_wayland_surface_role_get_surface (surface_role);
|
meta_wayland_surface_role_get_surface (surface_role);
|
||||||
MetaWaylandSurface *parent = surface->sub.parent;
|
MetaWaylandSurface *parent = surface->sub.parent;
|
||||||
|
|
||||||
return meta_wayland_surface_role_get_toplevel (parent->role);
|
if (parent->role)
|
||||||
|
return meta_wayland_surface_role_get_toplevel (parent->role);
|
||||||
|
else
|
||||||
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* A non-subsurface is always desynchronized.
|
/* A non-subsurface is always desynchronized.
|
||||||
|
Loading…
Reference in New Issue
Block a user