aboutsummaryrefslogtreecommitdiffstats
path: root/include/sway/tree/view.h
diff options
context:
space:
mode:
authorLibravatar Brian Ashworth <bosrsf04@gmail.com>2019-03-09 02:23:20 -0500
committerLibravatar Drew DeVault <sir@cmpwn.com>2019-03-11 10:57:16 -0400
commit4284de1c7b4ef56011f95f5f126e808312dd2cc3 (patch)
treeff80ce1a11e57b1a4485bd08ba01e2d4346279ca /include/sway/tree/view.h
parentdetect_proprietary: use strncmp (diff)
downloadsway-4284de1c7b4ef56011f95f5f126e808312dd2cc3.tar.gz
sway-4284de1c7b4ef56011f95f5f126e808312dd2cc3.tar.zst
sway-4284de1c7b4ef56011f95f5f126e808312dd2cc3.zip
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/sway/tree/view.h')
-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 {
202 struct wl_listener surface_map; 202 struct wl_listener surface_map;
203 struct wl_listener surface_unmap; 203 struct wl_listener surface_unmap;
204 struct wl_listener surface_destroy; 204 struct wl_listener surface_destroy;
205 struct wl_listener view_unmap;
205}; 206};
206 207
207struct sway_subsurface { 208struct sway_subsurface {