diff options
author | Robert Mader <robert.mader@collabora.com> | 2022-01-10 19:30:16 +0100 |
---|---|---|
committer | Robert Mader <robert.mader@posteo.de> | 2022-01-19 21:16:24 +0100 |
commit | 2405c3b3be7e722022554fd032f30dc3918374d5 (patch) | |
tree | acab198532fff21a5aafde4d9c5efe7c84ecb620 | |
parent | 0ef8847e6a1a2b1dd61d0be8c2b812e762bbaca2 (diff) | |
download | mutter-2405c3b3be7e722022554fd032f30dc3918374d5.tar.gz |
wayland/surface: Ensure to apply cached state
It is possible that we never create a cached state for a surface
even if it is synced. That is the case if `commit()` is never called.
We still need to call `apply_state()` in this case in order to run
e.g. `role_post_apply_state()` or `parent_state_applied` on subsurfaces.
So just ensure to initialize the cached state instead of bailing out.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2232>
(cherry picked from commit e3f0efa065d7263e26d5817aceb480e017ef6a75)
-rw-r--r-- | src/wayland/meta-wayland-surface.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/wayland/meta-wayland-surface.c b/src/wayland/meta-wayland-surface.c index 3802ae298..871aded3a 100644 --- a/src/wayland/meta-wayland-surface.c +++ b/src/wayland/meta-wayland-surface.c @@ -949,9 +949,7 @@ cleanup: void meta_wayland_surface_apply_cached_state (MetaWaylandSurface *surface) { - if (!surface->cached_state) - return; - + meta_wayland_surface_ensure_cached_state (surface); meta_wayland_surface_apply_state (surface, surface->cached_state); } |