diff options
author | Marius Vlad <marius.vlad@collabora.com> | 2022-03-31 23:20:45 +0300 |
---|---|---|
committer | Marius Vlad <marius.vlad@collabora.com> | 2022-05-12 16:53:55 +0300 |
commit | 299f87f0739ac3c73d71fb4000f18d455fcf4a4b (patch) | |
tree | cf03e9daf340aab79a1917d783b7ce0e23021875 /desktop-shell | |
parent | d03f01377a4b5e7c80c81957141a57f2319300aa (diff) | |
download | weston-299f87f0739ac3c73d71fb4000f18d455fcf4a4b.tar.gz |
desktop-shell: Clarify weston_view destruction at tear down
This documents the fact that other views are handled implictly by
libweston-desktop, and we shouldn't attempt to destroy indiscriminately
views that aren't created by desktop-shell.
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Diffstat (limited to 'desktop-shell')
-rw-r--r-- | desktop-shell/shell.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c index 15ea3223..54469d3a 100644 --- a/desktop-shell/shell.c +++ b/desktop-shell/shell.c @@ -4875,9 +4875,17 @@ desktop_shell_destroy_layer(struct weston_layer *layer) * additional black_view created and added to its layer_link * fullscreen view. See shell_ensure_fullscreen_black_view() * - * As that black_view it is not a weston_desktop_surface - * we can't have a shsurf for it so we just destroy it like - * we do it in desktop_surface_removed() */ + * Note that we do not choose to destroy all other potential + * views we find in the layer, but instead we explicitly verify + * if the view in question was explicitly created by + * desktop-shell, rather than libweston-desktop (in + * desktop_surface_added()). + * + * This is particularly important because libweston-desktop + * could create additional views, which are managed implicitly, + * but which are still being added to the layer list. + * + */ if (shsurf) desktop_shell_destroy_surface(shsurf); else if (is_black_surface_view(view, NULL)) |