[PATCH weston 9/9] ivi-shell: remove move_layer_cancel API

Emre Ucan eucan at de.adit-jv.com
Wed May 23 08:27:24 UTC 2018


Transitions are committed during commit_changes.
If we want to remove previously set transitions,
we need to call layer_set_transition with
IVI_LAYOUT_TRANSITION_NONE.

Therefore, this API is redundant.

Signed-off-by: Emre Ucan <eucan at de.adit-jv.com>
---
 ivi-shell/hmi-controller.c        |  4 +++-
 ivi-shell/ivi-layout-export.h     |  1 -
 ivi-shell/ivi-layout-transition.c | 12 ------------
 ivi-shell/ivi-layout.c            |  1 -
 4 files changed, 3 insertions(+), 15 deletions(-)

diff --git a/ivi-shell/hmi-controller.c b/ivi-shell/hmi-controller.c
index ed2ddb2..4880bc8 100644
--- a/ivi-shell/hmi-controller.c
+++ b/ivi-shell/hmi-controller.c
@@ -1783,7 +1783,9 @@ ivi_hmi_controller_workspace_control(struct wl_client *client,
 
 	layer = hmi_ctrl->workspace_layer.ivilayer;
 
-	hmi_ctrl->interface->transition_move_layer_cancel(layer);
+	hmi_ctrl->interface->layer_set_transition(layer,
+						  IVI_LAYOUT_TRANSITION_NONE,
+						  0);
 
 	switch (device) {
 	case HMI_GRAB_DEVICE_POINTER:
diff --git a/ivi-shell/ivi-layout-export.h b/ivi-shell/ivi-layout-export.h
index fee7adb..eb4247d 100644
--- a/ivi-shell/ivi-layout-export.h
+++ b/ivi-shell/ivi-layout-export.h
@@ -523,7 +523,6 @@ struct ivi_layout_interface {
 	/**
 	 * transision animation for layer
 	 */
-	void (*transition_move_layer_cancel)(struct ivi_layout_layer *layer);
 	int32_t (*layer_set_fade_info)(struct ivi_layout_layer* ivilayer,
 				       uint32_t is_fade_in,
 				       double start_alpha, double end_alpha);
diff --git a/ivi-shell/ivi-layout-transition.c b/ivi-shell/ivi-layout-transition.c
index 13c35f1..4124c03 100644
--- a/ivi-shell/ivi-layout-transition.c
+++ b/ivi-shell/ivi-layout-transition.c
@@ -744,18 +744,6 @@ ivi_layout_transition_move_layer(struct ivi_layout_layer *layer,
 	free(transition);
 }
 
-void
-ivi_layout_transition_move_layer_cancel(struct ivi_layout_layer *layer)
-{
-	struct ivi_layout_transition *transition =
-		get_transition_from_type_and_id(
-					IVI_LAYOUT_TRANSITION_LAYER_MOVE,
-					layer);
-	if (transition) {
-		layout_transition_destroy(transition);
-	}
-}
-
 /* fade layer transition */
 struct fade_layer_data {
 	struct ivi_layout_layer *layer;
diff --git a/ivi-shell/ivi-layout.c b/ivi-shell/ivi-layout.c
index 2b6985b..448ef17 100644
--- a/ivi-shell/ivi-layout.c
+++ b/ivi-shell/ivi-layout.c
@@ -1948,7 +1948,6 @@ static struct ivi_layout_interface ivi_layout_interface = {
 	/**
 	 * animation
 	 */
-	.transition_move_layer_cancel	= ivi_layout_transition_move_layer_cancel,
 	.layer_set_fade_info		= ivi_layout_layer_set_fade_info,
 
 	/**
-- 
2.7.4



More information about the wayland-devel mailing list