return EINA_TRUE;
}
+static Eina_Bool
+_rot_client_check_will_visible(E_Client *ec)
+{
+ E_Client *above = NULL;
+ Eina_Bool will_visible = EINA_TRUE;
+
+ for (above = e_client_above_get(ec); above; above = e_client_above_get(above))
+ {
+ if (e_client_util_ignored_get(above)) continue;
+ if (!E_CONTAINS(above->x, above->y, above->w, above->h, ec->x, ec->y, ec->w, ec->h)) continue;
+
+ if (above->visibility.obscured == E_VISIBILITY_UNOBSCURED)
+ {
+ if (!above->argb)
+ {
+ will_visible = EINA_FALSE;
+ break;
+ }
+ else
+ {
+ if (above->visibility.opaque > 0)
+ {
+ will_visible = EINA_FALSE;
+ break;
+ }
+ }
+ }
+ }
+
+ return will_visible;
+}
+
static void
_rot_client_cb_vis_prepare_foreground(void *data, Evas_Object *obj, void *event_info)
{
EDBG(ec, "Check ec %x to set fg_ec", e_client_util_win_get(ec));
if (_no_active_lockscreen_check(ec))
{
- EDBG(ec, "Set the fg_ec to %x", e_client_util_win_get(ec));
- fg_ec = ec;
+ if (ec->exp_iconify.not_raise)
+ {
+ if (_rot_client_check_will_visible(ec))
+ {
+ EDBG(ec, "Set the fg_ec to %x", e_client_util_win_get(ec));
+ fg_ec = ec;
+ }
+ }
+ else
+ {
+ EDBG(ec, "Set the fg_ec to %x", e_client_util_win_get(ec));
+ fg_ec = ec;
+ }
if (_camera_check(ec))
_unlock_rot_for_fg_app(ec->zone);
if (!ec)
return;
+ ELOGF("ROTATION", "Request to set Preferred angle:%d", ec->pixmap, ec, TIZEN_ROTATION_ANGLE_TO_INT(angle));
if ((angle != TIZEN_ROTATION_ANGLE_NONE) &&
(!e_mod_pol_conf_rot_enable_get(TIZEN_ROTATION_ANGLE_TO_INT(angle))))
{
if (TIZEN_ROTATION_ANGLE_TO_INT(angle) == e_client_rotation_curr_angle_get(ec))
{
ec->e.state.rot.preferred_rot = TIZEN_ROTATION_ANGLE_TO_INT(angle);
- EDBG(ec, "preferred angle is same as current angle. don't need to fetch.");
+ EDBG(ec, "preferred angle is same as current angle (%d). don't need to fetch.", ec->e.state.rot.preferred_rot);
return;
}
}
else
{
- ELOGF("ROTATION", " bg_ec:%p CHECK %s(%p) parent:%p vis:%d",
- NULL, NULL, bg_ec, ec->icccm.name, ec, ec->parent,
- ec->visibility.obscured);
+ ELOGF("ROTATION", " fg_ec:%x, bg_ec:%p CHECK %s(%p) parent:%p vis:%d argb:%d opaque:%d",
+ ec->pixmap, ec, e_client_util_win_get(fg_ec), bg_ec, ec->icccm.name, ec, ec->parent,
+ ec->visibility.obscured, ec->argb, ec->visibility.opaque);
/* if already found background client,
* that means this client is placed under background client */
if (bg_ec)