wayland: Handle unmapping surfaces
Right now the unmapped signal doesn't always fire which means we didn't see a surface that's being unmapped in these code paths before. In particular the resource, window and role can be gone. Handle those cases. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3783>
This commit is contained in:
parent
dbdc8dd958
commit
3e7b1d9cbd
2 changed files with 2 additions and 2 deletions
|
@ -122,7 +122,7 @@ popup_grab_get_focus_surface (MetaWaylandEventHandler *handler,
|
|||
device,
|
||||
sequence);
|
||||
|
||||
if (surface &&
|
||||
if (surface && surface->resource &&
|
||||
wl_resource_get_client (surface->resource) == popup_grab->grab_client)
|
||||
return surface;
|
||||
}
|
||||
|
|
|
@ -1501,7 +1501,7 @@ update_surface_output_state (gpointer key, gpointer value, gpointer user_data)
|
|||
void
|
||||
meta_wayland_surface_update_outputs (MetaWaylandSurface *surface)
|
||||
{
|
||||
if (!surface->compositor)
|
||||
if (!surface->compositor || !surface->role)
|
||||
return;
|
||||
|
||||
g_hash_table_foreach (surface->compositor->outputs,
|
||||
|
|
Loading…
Reference in a new issue