From fc79b7c2d27af881c57d193667d1efb2f7f90eb5 Mon Sep 17 00:00:00 2001
From: emersion <contact@emersion.fr>
Date: Mon, 26 Nov 2018 23:57:33 +0100
Subject: Handle destroyed subsurfaces

Damage subsurfaces when they are destroyed. Since subsurfaces don't have an
unmap event we need to do that on destroy.

We also don't want to keep a sway_view_child when the wlr_subsurface has been
destroyed.

Fixes https://github.com/swaywm/sway/issues/3197
---
 include/sway/tree/view.h | 6 ++++++
 1 file changed, 6 insertions(+)

(limited to 'include/sway')

diff --git a/include/sway/tree/view.h b/include/sway/tree/view.h
index 4716c688..d74f1bc9 100644
--- a/include/sway/tree/view.h
+++ b/include/sway/tree/view.h
@@ -203,6 +203,12 @@ struct sway_view_child {
 	struct wl_listener surface_destroy;
 };
 
+struct sway_subsurface {
+	struct sway_view_child child;
+
+	struct wl_listener destroy;
+};
+
 struct sway_xdg_popup_v6 {
 	struct sway_view_child child;
 
-- 
cgit v1.2.3