* hook and given ec has always mapped state.
*/
static Eina_Bool
-_rot_hook_fg_set(void *d EINA_UNUSED, E_Client *ec)
+_rot_fg_set(E_Client *ec, Eina_Bool check_obscured)
{
Policy_Ext_Rotation *rot;
EDBG(ec, "Check ec %x to set fg_ec", e_client_util_win_get(ec));
if (_no_active_lockscreen_check(ec))
{
- /* don't need to check visibility of given foreground ec
- * it will have E_VISIBILITY_UNOBSCURED soon
- */
- EDBG(ec, "Set the fg_ec to %x", e_client_util_win_get(ec));
- fg_ec = ec;
+ if (check_obscured)
+ {
+ if (ec->visibility.obscured != E_VISIBILITY_FULLY_OBSCURED)
+ {
+ EDBG(ec, "Set the fg_ec to %x", e_client_util_win_get(ec));
+ fg_ec = ec;
+ }
+ }
+ else
+ {
+ /* don't need to check visibility of given foreground ec
+ * it will have E_VISIBILITY_UNOBSCURED soon
+ */
+ 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);
}
static Eina_Bool
-_rot_intercept_hook_show_helper(void *d EINA_UNUSED, E_Client *ec)
+_rot_hook_fg_set(void *d EINA_UNUSED, E_Client *ec)
{
- Policy_Ext_Rotation *rot;
-
- rot = eina_hash_find(rot_hash, &ec);
- if (!rot)
- return EINA_TRUE;
-
- if (e_pixmap_type_get(ec->pixmap) == E_PIXMAP_TYPE_EXT_OBJECT)
- return EINA_TRUE;
-
- if (!rot->hint_fetch)
- {
- /* need to fetch rotation hint. */
- ec->e.state.rot.pending_show = 1;
- EC_CHANGED(ec);
- return EINA_FALSE;
- }
-
- if (ec->e.state.rot.pending_show)
- return EINA_FALSE;
-
- if (e_policy_visibility_client_is_activity(ec))
- {
- EDBG(ec, "Check ec %x to set fg_ec", e_client_util_win_get(ec));
- if (_no_active_lockscreen_check(ec))
- {
- if (ec->visibility.obscured != E_VISIBILITY_FULLY_OBSCURED)
- {
- 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);
- else
- _try_lock_rot_for_fg_app(ec->zone);
- }
- }
-
- _e_client_rotation_zone_set(ec->zone, ec, NULL);
- if (ec->changes.rotation)
- {
- EDBG(ec, "Postpone show: ang %d", ec->e.state.rot.ang.next);
- e_pixmap_image_clear(ec->pixmap, 1);
- ec->e.state.rot.pending_show = 1;
- /* to be invoked 'eval_end' */
- EC_CHANGED(ec);
- return EINA_FALSE;
- }
+ return _rot_fg_set(ec, EINA_FALSE);
+}
- return EINA_TRUE;
+static Eina_Bool
+_rot_intercept_hook_show_helper(void *d EINA_UNUSED, E_Client *ec)
+{
+ return _rot_fg_set(ec, EINA_TRUE);
}
static Eina_Bool