1
0
Fork 0

wayland/surface: Can't send scale events with NULL surface->resource

The committed state can't have any children sub-surfaces either, so
just bail.

Fixes: ae403f2e94 ("wayland: Use new highest scale monitor tracking for fractional_scale_v1")
Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/3552

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3849>
This commit is contained in:
Michel Dänzer 2024-06-27 18:42:45 +02:00 committed by Robert Mader
parent b6fb8d87f4
commit 94f3bbd94b

View file

@ -2450,6 +2450,10 @@ committed_state_handle_highest_scale_monitor (MetaWaylandSurface *surface)
MetaWaylandSurface *subsurface_surface;
double scale;
/* Nothing to do if the client already destroyed the wl_surface */
if (!surface->resource)
return;
scale = meta_wayland_surface_get_highest_output_scale (surface);
meta_wayland_fractional_scale_maybe_send_preferred_scale (surface, scale);