/* if this client don't have parent, rotate */
if (!ec->parent)
{
- /* rotate window only if auto-rotation is enabled.
+ /* 1. rotate window only if auto-rotation is enabled.
* it can show wrong rotated window if we don't check auto-rot value.
*
* assuming that auto-rotation is disabled and window A is 0 degree.
* always rotated, window A is changed to 270 degrees before showing
* camera-app window. to prevent this we should check whether auto
* rotation is enabled.
+ *
+ * 2. also need to check this ec is visible before rotating it.
+ *
+ * e.g. camera -> image-viewer launching case
+ *
+ * image-viewer: bg_ec is set to image-viewer ec at the previous phase of this loop
+ * ec: camera
+ *
+ * if we decide to rotate camera ec which is obscured by image-viewer window,
+ * then camera app will not send rotation done event. thus it occurrs rotation time
+ * out error. to resolve this issue we should exclude obscured camera ec from
+ * rotation list.
*/
if ((!zone->rot.block.sys_auto_rot) &&
- (e_mod_pol_conf_rot_enable_get(cur_angle)))
- e_client_rotation_set(ec, cur_angle);
+ (e_mod_pol_conf_rot_enable_get(cur_angle)) &&
+ (ec->visibility.obscured != E_VISIBILITY_FULLY_OBSCURED))
+ {
+ ELOGF("ROTATION", "Do rotation of below ec under bg_ec %s(%p)",
+ NULL, NULL, ec->icccm.name, ec);
+
+ e_client_rotation_set(ec, cur_angle);
+ }
}
continue;
}