desktop-shell: Don't process surfaces under destruction during output resize

An output resize may occur while a shell surface is in the process of
being destroyed, e.g., while the destruction fade-out animation is in
progress. In such cases although the shell surface exists, it's missing
the backing weston_desktop_surface, so ensure to check for that.

Fixes: #805
Fixes: eefd8ae2e0
Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com>
This commit is contained in:
Alexandros Frantzis 2023-08-29 09:50:41 +03:00 committed by Daniel Stone
parent c00ef0a5ce
commit 7dcde16f22

View file

@ -4672,17 +4672,20 @@ handle_output_resized_shsurfs(struct desktop_shell *shell)
struct shell_surface *shsurf;
wl_list_for_each(shsurf, &shell->shsurf_list, link) {
if (shsurf_is_max_or_fullscreen(shsurf)) {
struct weston_desktop_surface *dsurface =
shsurf->desktop_surface;
struct weston_desktop_surface *dsurface =
shsurf->desktop_surface;
if (dsurface) {
bool is_maximized =
weston_desktop_surface_get_maximized(dsurface);
bool is_fullscreen =
weston_desktop_surface_get_fullscreen(dsurface);
set_shsurf_size_maximized_or_fullscreen(shsurf,
is_maximized,
is_fullscreen);
if (is_maximized || is_fullscreen) {
set_shsurf_size_maximized_or_fullscreen(shsurf,
is_maximized,
is_fullscreen);
}
}
}
}