mirror of
https://github.com/brl/mutter.git
synced 2024-12-24 12:02:04 +00:00
wayland: Handle parent-less popup commits
A xdg_popup, when active, always has a parent surface. However, a popup created may immediately become invalid, for example when it is not granted a grab, in which case it won't be assigned a parent since it will never be mapped. This case needs to be handled elsewhere, as one cannot assume a MetaWaylandXdgPoup that is processed (via wl_surface commit handling etc) will have a parent_surface. https://bugzilla.gnome.org/show_bug.cgi?id=771495
This commit is contained in:
parent
32b87e7bea
commit
417757eab8
@ -856,7 +856,10 @@ xdg_popup_role_get_toplevel (MetaWaylandSurfaceRole *surface_role)
|
||||
{
|
||||
MetaWaylandXdgPopup *xdg_popup = META_WAYLAND_XDG_POPUP (surface_role);
|
||||
|
||||
if (xdg_popup->parent_surface)
|
||||
return meta_wayland_surface_get_toplevel (xdg_popup->parent_surface);
|
||||
else
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
|
Loading…
Reference in New Issue
Block a user