ec->changes.rotation = 0;
}
+static Eina_Bool
+_e_client_rotation_angle_is_allowed(E_Client *ec, int angle)
+{
+ if ((!_camera_check(ec)) &&
+ (!e_mod_pol_conf_rot_enable_get(angle)))
+ {
+ EDBG(ec, "CHECK dependent '%s'(%p) ang:%d rot.type:%d dependent:%d",
+ ec->icccm.name, ec, angle,
+ ec->e.state.rot.type,
+ E_CLIENT_ROTATION_TYPE_DEPENDENT);
+
+ /* check whether the window is 32bit and has the dependent rotation type.
+ * if true, then it can be rotated according to below normal window
+ * even if current zone angle is not allowed by configuration value.
+ */
+ if (!((ec->argb) && (e_client_rotation_is_available(ec, angle))))
+ return EINA_FALSE;
+ }
+ return EINA_TRUE;
+}
+
/* TODO need to optimize */
static Eina_Bool
_e_client_rotation_zone_set(E_Zone *zone, E_Client *include_ec, E_Client *exclude_ec)
((include_ec == ec) &&
(evas_object_layer_get(ec->frame) >= evas_object_layer_get(bg_ec->frame))))
{
- EDBG(ec, "Append to rotation target list");
- target_list = eina_list_append(target_list, ec);
+ if (_e_client_rotation_angle_is_allowed(ec, cur_angle))
+ {
+ EDBG(ec, "Append to rotation target list");
+ target_list = eina_list_append(target_list, ec);
+ }
}
else
{
}
}
- /* TODO: Fix me. To prevent rotation of 180 degrees for normal app */
- if ((!_camera_check(ec)) &&
- (!e_mod_pol_conf_rot_enable_get(cur_angle)))
+ if (_e_client_rotation_angle_is_allowed(ec, cur_angle))
{
- EDBG(ec, "CHECK dependent '%s'(%p) ang:%d rot.type:%d dependent:%d",
- ec->icccm.name, ec, cur_angle,
- ec->e.state.rot.type,
- E_CLIENT_ROTATION_TYPE_DEPENDENT);
-
- /* check whether the window is 32bit and has the dependent rotation type.
- * if true, then it can be rotated according to below normal window
- * even if current zone angle is not allowed by configuration value.
- */
- if (!((ec->argb) && (e_client_rotation_is_available(ec, cur_angle))))
- continue;
+ EDBG(ec, "Append Rotation List '%s'(%p)", ec->icccm.name, ec);
+ target_list = eina_list_append(target_list, ec);
}
-
- EDBG(ec, "Append Rotation List '%s'(%p)", ec->icccm.name, ec);
- target_list = eina_list_append(target_list, ec);
if (ec == fg_ec)
bg_ec = ec;
}
}
angle = cur_angle;
+
+ if (!target_list || (target_list && eina_list_count(target_list) == 0))
+ {
+ DBG("Duna Failed to set rotation with zone: target_list is empty. angle: %d", angle);
+ if (fg_ec)
+ angle = _e_client_rotation_curr_next_get(fg_ec);
+ can_rotate = EINA_FALSE;
+ }
+
EINA_LIST_FOREACH(target_list, l, ec)
{
if (!e_client_rotation_is_available(ec, angle))
// in case same with current angle.
curr_rot = e_client_rotation_curr_angle_get(ec);
+ EDBG(ec, "Client Rotation name:%s, curr_rot:%d, rotation:%d", ec->icccm.name?:"NULL", curr_rot, rotation);
if (curr_rot == rotation)
{
if (e_client_rotation_is_progress(ec))