Tearing down the ivi compositor instance (the shell) requires listening
for such an event and handle any potential destruction of surfaces.
With it we use to destroying any pending surfaces might have been left.
Bug-AGL: SPEC-4133
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I911c590409700374007673da680b7a76f69be1b2
.set_xwayland_position = desktop_set_xwayland_position,
};
+static void
+ivi_shell_destroy(struct wl_listener *listener, void *data)
+{
+ struct ivi_compositor *ivi = container_of(listener,
+ struct ivi_compositor, destroy_listener);
+
+ ivi_compositor_destroy_pending_surfaces(ivi);
+}
+
int
ivi_desktop_init(struct ivi_compositor *ivi)
{
return -1;
}
+ if (!weston_compositor_add_destroy_listener_once(ivi->compositor,
+ &ivi->destroy_listener, ivi_shell_destroy)) {
+ return -1;
+ }
+
return 0;
}
struct wl_list split_pending_apps;
struct wl_list remote_pending_apps;
+ struct wl_listener destroy_listener;
+
struct weston_layer hidden;
struct weston_layer background;
struct weston_layer normal;
bool
ivi_check_pending_surface(struct ivi_surface *surface);
+void
+ivi_compositor_destroy_pending_surfaces(struct ivi_compositor *ivi);
+
#endif
}
}
-static void
+void
ivi_compositor_destroy_pending_surfaces(struct ivi_compositor *ivi)
{
struct pending_popup *p_popup, *next_p_popup;