mirror of
https://github.com/brl/mutter.git
synced 2025-01-22 09:29:25 +00:00
wayland/xdg-shell: Dismiss a popup on map if parent already dismissed
If a parent doesn't have a window, it means it could have been dismissed (for example due to a input serial race), but the more recent popup might win the input serial race and try to map anyway. This would result in a crash later on when trying to process the placement rule, as the parent already has no window. https://bugzilla.gnome.org/show_bug.cgi?id=790358
This commit is contained in:
parent
c533a06e93
commit
4508978ea5
@ -798,6 +798,12 @@ finish_popup_setup (MetaWaylandXdgPopup *xdg_popup)
|
||||
xdg_popup->setup.parent_surface = NULL;
|
||||
xdg_popup->setup.grab_seat = NULL;
|
||||
|
||||
if (!parent_surface->window)
|
||||
{
|
||||
zxdg_popup_v6_send_popup_done (xdg_popup->resource);
|
||||
return;
|
||||
}
|
||||
|
||||
if (seat)
|
||||
{
|
||||
MetaWaylandSurface *top_popup;
|
||||
|
Loading…
x
Reference in New Issue
Block a user