Commit dada6e3b authored by Mateusz Polrola's avatar Mateusz Polrola Committed by Pekka Paalanen

ivi-shell: Remove all surface transitions when it is being removed.

If surface transitions are not removed when surface is being removed, it
can lead to crash later when transition will finish, as it will try to
reference already freed memory.
This change exposes function that can remove all existing transitions
for given surface and it is being called during surface cleanup.
Signed-off-by: default avatarMateusz Polrola <>
Reviewed-by: eucan's avatarEmre Ucan <>
Reviewed-by: default avatarBryce Harrington <>
Reviewed-by: Pekka Paalanen's avatarPekka Paalanen <>
parent c6a55dbf
......@@ -158,6 +158,9 @@ ivi_layout_transition_fade_layer(struct ivi_layout_layer *layer,
is_surface_transition(struct ivi_layout_surface *surface);
ivi_layout_remove_all_surface_transitions(struct ivi_layout_surface *surface);
* methods of interaction between ivi-shell with ivi-layout
......@@ -99,6 +99,22 @@ is_surface_transition(struct ivi_layout_surface *surface)
return 0;
ivi_layout_remove_all_surface_transitions(struct ivi_layout_surface *surface)
struct ivi_layout *layout = get_instance();
struct transition_node *node;
struct transition_node *tmp;
struct ivi_layout_transition *tran;
wl_list_for_each_safe(node, tmp, &layout->transitions->transition_list, link) {
tran = node->transition;
if (tran->is_transition_func(tran->private_data, surface)) {
static void
tick_transition(struct ivi_layout_transition *transition, uint32_t timestamp)
......@@ -241,6 +241,8 @@ ivi_layout_surface_destroy(struct ivi_layout_surface *ivisurf)
wl_signal_emit(&layout->surface_notification.removed, ivisurf);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment