aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--types/wlr_viewporter.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/types/wlr_viewporter.c b/types/wlr_viewporter.c
index 9b7e1099..34e8d78d 100644
--- a/types/wlr_viewporter.c
+++ b/types/wlr_viewporter.c
@@ -95,6 +95,12 @@ static void viewport_destroy(struct wlr_viewport *viewport) {
if (viewport == NULL) {
return;
}
+
+ struct wlr_surface_state *pending = &viewport->surface->pending;
+ pending->viewport.has_src = false;
+ pending->viewport.has_dst = false;
+ pending->committed |= WLR_SURFACE_STATE_VIEWPORT;
+
wl_resource_set_user_data(viewport->resource, NULL);
wl_list_remove(&viewport->surface_destroy.link);
wl_list_remove(&viewport->surface_commit.link);