summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarius Vlad <marius.vlad@collabora.com>2020-06-26 16:04:38 +0300
committerMarius Vlad <marius.vlad@collabora.com>2020-07-03 13:56:10 +0300
commit39ea644837dd29cd47a579a9703b43458187f82b (patch)
tree352c1311f32fe6005f983922a9e6255f73c91a9e
parentfaea097edab0971709e847193e1bf1837ab8030c (diff)
desktop: Fix destruction of applications that fallback to the desktop role
With commit 9827cfd25578, application not having a valid app_id will fallback to being assigned the desktop role. In this case, destroying those kind of surfaces will not have an output assigned, so add a code path for those as well. Found while testing cluster-receiver with waylandsink and sub-surfaces. Bug-AGL: SPEC-3382 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: If20bdcf02810c16167fdbfbf30f3fd367c43069b
-rw-r--r--src/desktop.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/desktop.c b/src/desktop.c
index 5b7b2e5..0fca2fd 100644
--- a/src/desktop.c
+++ b/src/desktop.c
@@ -139,8 +139,13 @@ desktop_surface_removed(struct weston_desktop_surface *dsurface, void *userdata)
struct ivi_output *output = ivi_layout_get_output_from_surface(surface);
/* special corner-case, pending_surfaces which are never activated or
- * being assigned an output might land here so just remove the surface */
- if (output == NULL && surface->role == IVI_SURFACE_ROLE_NONE)
+ * being assigned an output might land here so just remove the surface;
+ *
+ * the DESKTOP role can happen here as well, because we can fall-back
+ * to that when we try to determine the role type. Application that
+ * do not set the app_id will be land here, when destroyed */
+ if (output == NULL && (surface->role == IVI_SURFACE_ROLE_NONE ||
+ surface->role == IVI_SURFACE_ROLE_DESKTOP))
goto skip_output_asignment;
assert(output != NULL);