rotation: don't wait for ack_angle_change if all tizen_roatation are destroied 88/109888/2 accepted/tizen/3.0/common/20170116.122021 accepted/tizen/3.0/ivi/20170116.064532 accepted/tizen/3.0/mobile/20170116.064417 accepted/tizen/3.0/tv/20170116.064450 accepted/tizen/3.0/wearable/20170116.064515 accepted/tizen/common/20170113.183616 accepted/tizen/ivi/20170113.223810 accepted/tizen/mobile/20170113.223719 accepted/tizen/tv/20170113.223736 accepted/tizen/wearable/20170113.223754 submit/tizen/20170112.112612 submit/tizen_3.0/20170112.112313
authorMinJeong Kim <minjjj.kim@samsung.com>
Thu, 12 Jan 2017 06:41:29 +0000 (15:41 +0900)
committerGwanglim Lee <gl77.lee@samsung.com>
Thu, 12 Jan 2017 07:21:10 +0000 (23:21 -0800)
Change-Id: Ibbaa6bce3711bc855a4e3aa02f6f1123e99662ab
Signed-off-by: MinJeong Kim <minjjj.kim@samsung.com>
src/rotation/e_mod_rotation_wl.c

index 624ebbb..5488bd7 100644 (file)
@@ -444,12 +444,21 @@ _e_tizen_rotation_ack_angle_change_cb(struct wl_client *client,
 static void
 _e_tizen_rotation_destroy(struct wl_resource *resource)
 {
-   Policy_Ext_Rotation *rot;
+   Policy_Ext_Rotation *ext_rot;
 
-   rot = wl_resource_get_user_data(resource);
-   EINA_SAFETY_ON_NULL_RETURN(rot);
+   ext_rot = wl_resource_get_user_data(resource);
+   EINA_SAFETY_ON_NULL_RETURN(ext_rot);
 
-   rot->rotation_list = eina_list_remove(rot->rotation_list, resource);
+   ext_rot->rotation_list = eina_list_remove(ext_rot->rotation_list, resource);
+
+   /* if there's no connected client of tizen_rotation */
+   if (!ext_rot->rotation_list)
+     {
+        _e_client_rotation_list_remove(ext_rot->ec);
+        if (rot.async_list) rot.async_list = eina_list_remove(rot.async_list, ext_rot->ec);
+
+        ext_rot->angle_change_done = EINA_TRUE;
+     }
 }
 
 static void