aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorFurkan Sahin <furkan-dev@proton.me>2019-03-09 02:23:20 -0500
committerFurkan Sahin <furkan-dev@proton.me>2019-03-09 02:23:20 -0500
commit5189fc83ba593bc1650a5d90ba5569d28942f227 (patch)
treea5c0370608ad04223fecdcd7890c3b1559dff39e /include
parent3be10da2a6d9c9ee170898032f97038faf20a22d (diff)
sway_view_child: add listener for view unmap
Since not all child views's have an unmap event, it is possible for it to still be mapped (default state) in the destruction handler. When the destruction handler is called, the corresponding view may have already been freed and the memory location reallocated. This adds a listener for the view unmapping and removes the mapped status. This ensures that the child view is damaged due to destruction while the view still exists and not after.
Diffstat (limited to 'include')
-rw-r--r--include/sway/tree/view.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/sway/tree/view.h b/include/sway/tree/view.h
index 5cc9777b..ac203ac7 100644
--- a/include/sway/tree/view.h
+++ b/include/sway/tree/view.h
@@ -202,6 +202,7 @@ struct sway_view_child {
struct wl_listener surface_map;
struct wl_listener surface_unmap;
struct wl_listener surface_destroy;
+ struct wl_listener view_unmap;
};
struct sway_subsurface {