mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 09:30:45 -05:00
wayland: Set the xdg_popup pointer even when not mapping
If we immediately dismiss the popup, we still need to set the surface->xdg_popup pointer field in order for the destructor to properly clean up the state. Not doing this may cause a crash if the xdg_popup resource that was immediately dismissed is destoryed after wl_surface during client destruction. https://bugzilla.gnome.org/show_bug.cgi?id=756675
This commit is contained in:
parent
ffd95c2ad5
commit
d6d377a447
@ -1515,15 +1515,15 @@ xdg_shell_get_xdg_popup (struct wl_client *client,
|
||||
surface,
|
||||
xdg_popup_destructor);
|
||||
|
||||
surface->xdg_popup = popup_resource;
|
||||
surface->xdg_shell_resource = resource;
|
||||
|
||||
if (!meta_wayland_pointer_can_popup (&seat->pointer, serial))
|
||||
{
|
||||
xdg_popup_send_popup_done (popup_resource);
|
||||
return;
|
||||
}
|
||||
|
||||
surface->xdg_popup = popup_resource;
|
||||
surface->xdg_shell_resource = resource;
|
||||
|
||||
surface->popup.parent = parent_surf;
|
||||
surface->popup.parent_destroy_listener.notify = handle_popup_parent_destroyed;
|
||||
wl_resource_add_destroy_listener (parent_surf->resource,
|
||||
|
Loading…
Reference in New Issue
Block a user