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
@ -122,7 +122,7 @@ popup_grab_get_focus_surface (MetaWaylandEventHandler *handler,
|
|||||||
device,
|
device,
|
||||||
sequence);
|
sequence);
|
||||||
|
|
||||||
if (surface &&
|
if (surface && surface->resource &&
|
||||||
wl_resource_get_client (surface->resource) == popup_grab->grab_client)
|
wl_resource_get_client (surface->resource) == popup_grab->grab_client)
|
||||||
return surface;
|
return surface;
|
||||||
}
|
}
|
||||||
|
@ -1501,7 +1501,7 @@ update_surface_output_state (gpointer key, gpointer value, gpointer user_data)
|
|||||||
void
|
void
|
||||||
meta_wayland_surface_update_outputs (MetaWaylandSurface *surface)
|
meta_wayland_surface_update_outputs (MetaWaylandSurface *surface)
|
||||||
{
|
{
|
||||||
if (!surface->compositor)
|
if (!surface->compositor || !surface->role)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
g_hash_table_foreach (surface->compositor->outputs,
|
g_hash_table_foreach (surface->compositor->outputs,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user