summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/desktop.c14
-rw-r--r--src/ivi-compositor.h5
-rw-r--r--src/shell.c2
3 files changed, 20 insertions, 1 deletions
diff --git a/src/desktop.c b/src/desktop.c
index ac68b78..a0cb2d2 100644
--- a/src/desktop.c
+++ b/src/desktop.c
@@ -436,6 +436,15 @@ static const struct weston_desktop_api desktop_api = {
.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)
{
@@ -445,5 +454,10 @@ 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;
}
diff --git a/src/ivi-compositor.h b/src/ivi-compositor.h
index 0449eb1..e89d215 100644
--- a/src/ivi-compositor.h
+++ b/src/ivi-compositor.h
@@ -98,6 +98,8 @@ struct ivi_compositor {
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;
@@ -424,4 +426,7 @@ ivi_destroy_waltham_destroy(struct ivi_surface *surface);
bool
ivi_check_pending_surface(struct ivi_surface *surface);
+void
+ivi_compositor_destroy_pending_surfaces(struct ivi_compositor *ivi);
+
#endif
diff --git a/src/shell.c b/src/shell.c
index 3f528de..6fcdfe8 100644
--- a/src/shell.c
+++ b/src/shell.c
@@ -1068,7 +1068,7 @@ shell_desktop_set_app_property(struct wl_client *client,
}
}
-static void
+void
ivi_compositor_destroy_pending_surfaces(struct ivi_compositor *ivi)
{
struct pending_popup *p_popup, *next_p_popup;