_no_active_lockscreen_check(E_Client *ec)
{
E_Client *ec2 = NULL;
+ E_Zone *zone;
int x, y, w, h;
if (!ec) return EINA_FALSE;
+ zone = e_comp_zone_find_by_ec(ec);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(zone, EINA_FALSE);
+
/* NB: to set fg_ec to lockscreen, return true if given ec is lockscreen itself. */
if (e_policy_client_is_lockscreen(ec)) return EINA_TRUE;
if (e_policy_client_is_lockscreen(ec2))
{
e_client_geometry_get(ec2, &x, &y, &w, &h);
- if (E_CONTAINS(ec->zone->x, ec->zone->y, ec->zone->w, ec->zone->h,
- x, y, w, h))
+ if (E_CONTAINS(zone->x, zone->y, zone->w, zone->h, x, y, w, h))
{
/* lockscreen is shown on top of given ec. */
return EINA_FALSE;
{
Policy_Ext_Rotation *rot;
E_Client *ec;
+ E_Zone *zone;
rot = data;
ec = rot->ec;
+ zone = e_comp_zone_find_by_ec(ec);
+ EINA_SAFETY_ON_NULL_RETURN(zone);
+
EDBG(ec, "Update Foreground Client '%s'(%p)", ec->icccm.name, ec);
if (e_policy_visibility_client_is_activity(ec))
{
}
if (_camera_check(ec))
- _unlock_rot_for_fg_app(ec->zone);
+ _unlock_rot_for_fg_app(zone);
else
- _try_lock_rot_for_fg_app(ec->zone);
+ _try_lock_rot_for_fg_app(zone);
}
}
- _e_client_rotation_zone_set(ec->zone, ec, NULL);
+ _e_client_rotation_zone_set(zone, ec, NULL);
if (ec->changes.rotation)
{
EDBG(ec, "Postpone foreground: ang %d", ec->e.state.rot.ang.next);
{
E_Client *ec;
Policy_Ext_Rotation *rot;
+ E_Zone *zone;
rot = wl_resource_get_user_data(resource);
EINA_SAFETY_ON_NULL_RETURN(rot);
TIZEN_ROTATION_ANGLE_TO_INT(rot->cur_angle),
serial);
+ zone = e_comp_zone_find_by_ec(ec);
+ EINA_SAFETY_ON_NULL_RETURN(zone);
+
if ((serial != 0) && (rot->serial == serial)) // rotation success
{
if (rot->angle_change_done)
WRN("Rotation Zone Set: Rotation Done(fail case): %s(%p) Not matched serial %u != %u",
ec->icccm.name ? ec->icccm.name : "", ec, rot->serial, serial);
- _e_client_rotation_zone_set(ec->zone, ec, NULL);
+ _e_client_rotation_zone_set(zone, ec, NULL);
}
// check angle change serial
{
ec = e_client_from_surface_resource(surface);
if (ec)
- zone = ec->zone;
+ zone = e_comp_zone_find_by_ec(ec);
else
zone = e_zone_current_get();
}
Eina_List *l;
struct wl_resource *res;
int ang_zone = 0;
+ E_Zone *zone;
- if (ec->zone)
+ zone = e_comp_zone_find_by_ec(ec);
+ if (zone)
{
- if (ec->zone->rot.unknown_state)
- ang_zone = ec->zone->rot.act;
+ if (zone->rot.unknown_state)
+ ang_zone = zone->rot.act;
else
- ang_zone = ec->zone->rot.curr;
+ ang_zone = zone->rot.curr;
zone_tz_angle = INT_TO_TIZEN_ROTATION_ANGLE(ang_zone);
}
// Check whether the width and height of ec are swapped or not.
// If you want to make your swap policy, then you can modify this function.
+ E_Zone *zone;
+
if (!e_config->wm_win_rotation_swap_size)
return EINA_FALSE;
e_policy_client_is_keyboard_sub(ec))
return EINA_FALSE;
+ zone = e_comp_zone_find_by_ec(ec);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(zone, EINA_FALSE);
+
e_client_geometry_get(ec, &x, &y, &w, &h);
- if ((x != ec->zone->x) ||
- (y != ec->zone->y) ||
- (w != ec->zone->w) ||
- (h != ec->zone->h))
+ if ((x != zone->x) ||
+ (y != zone->y) ||
+ (w != zone->w) ||
+ (h != zone->h))
return EINA_TRUE;
return EINA_FALSE;
{
E_Event_Client_Rotation_Change_End *ev = NULL;
Eina_Bool found = EINA_FALSE;
+ E_Zone *zone;
+
+ zone = e_comp_zone_find_by_ec(ec);
+ EINA_SAFETY_ON_NULL_RETURN(zone);
if (eina_list_data_find(rot.list, ec) == ec)
{
}
/* handling pending zone rotation job */
else if ((eina_list_count(rot.list) == 0) &&
- (ec->zone->rot.wait_for_done) &&
- (ec->zone->rot.pending))
+ (zone->rot.wait_for_done) &&
+ (zone->rot.pending))
{
- e_zone_rotation_update_done(ec->zone);
+ e_zone_rotation_update_done(zone);
}
}
ec->e.state.rot.ang.next = -1;
E_CLIENT_REVERSE_FOREACH(ec)
{
- if (ec->zone != zone) continue;
+ if (zone != e_comp_zone_find_by_ec(ec)) continue;
if (ec == exclude_ec) continue;
if ((ec != include_ec) && (!evas_object_visible_get(ec->frame))) continue;
if (e_object_is_del(E_OBJECT(ec))) continue;
E_Client *below = NULL;
Eina_Bool below_rot = EINA_TRUE;
int ec_x, ec_y, ec_w, ec_h;
+ E_Zone *zone;
if (ang < 0) return EINA_FALSE;
if (!ec->e.state.rot.support)
goto no_hint;
+ zone = e_comp_zone_find_by_ec(ec);
+ EINA_SAFETY_ON_NULL_GOTO(zone, no_hint);
+
if (ec->e.state.rot.type == E_CLIENT_ROTATION_TYPE_DEPENDENT)
{
// check below fullsize window's angle
ec_h = ec->h;
e_client_geometry_get(ec, &ec_x, &ec_y, &ec_w, &ec_h);
- if ((ec_x == ec->zone->x) && (ec_y == ec->zone->y) &&
- (ec_w == ec->zone->w) && (ec_h == ec->zone->h))
+ if ((ec_x == zone->x) && (ec_y == zone->y) &&
+ (ec_w == zone->w) && (ec_h == zone->h))
{
below = e_client_rotation_find_below(ec);
if (below)
int new_x, new_y;
int x1, y1, x2, y2;
int zx, zy, zw, zh;
+ E_Zone *zone;
+
+ zone = e_comp_zone_find_by_ec(ec);
+ EINA_SAFETY_ON_NULL_RETURN(zone);
- angle = ec->zone->rot.curr;
+ angle = zone->rot.curr;
e_client_geometry_get(ec, &x, &y, &w, &h);
new_x = x;
y1 = y;
y2 = y+h;
- zx = ec->zone->x;
- zy = ec->zone->y;
- zw = ec->zone->w;
- zh = ec->zone->h;
+ zx = zone->x;
+ zy = zone->y;
+ zw = zone->w;
+ zh = zone->h;
// calculate x position
if (x1 < 0)
{
Policy_Ext_Rotation *ext_rot;
struct wl_resource *res;
+ E_Zone *zone;
_e_client_rotation_list_remove(ec);
if (rot.async_list) rot.async_list = eina_list_remove(rot.async_list, ec);
fg_ec = NULL;
if (_camera_check(ec))
- _try_lock_rot_for_fg_app(ec->zone);
+ {
+ zone = e_comp_zone_find_by_ec(ec);
+ if (zone) _try_lock_rot_for_fg_app(zone);
+ }
}
}
static void
_rot_hook_eval_end(void *d EINA_UNUSED, E_Client *ec)
{
+ E_Zone *zone;
+
+ zone = e_comp_zone_find_by_ec(ec);
+ EINA_SAFETY_ON_NULL_RETURN(zone);
+
if (ec->changes.rotation)
{
- E_Zone *zone = ec->zone;
int ec_x, ec_y, ec_w, ec_h;
if (ec->moving) e_client_act_move_end(ec, NULL);
else if ((evas_object_visible_get(ec->frame) && (ec->e.fetch.rot.need_rotation)))
{
DBG("Rotation Zone Set: Fetch Hint");
- _e_client_rotation_zone_set(ec->zone, NULL, NULL);
+ E_Zone *zone;
+ zone = e_comp_zone_find_by_ec(ec);
+ if (zone) _e_client_rotation_zone_set(zone, NULL, NULL);
}
if (ec->e.fetch.rot.need_rotation)
_rot_fg_set(E_Client *ec, Eina_Bool check_obscured)
{
Policy_Ext_Rotation *rot;
+ E_Zone *zone;
rot = eina_hash_find(rot_hash, &ec);
if (!rot)
if (ec->e.state.rot.pending_show)
return EINA_FALSE;
+ zone = e_comp_zone_find_by_ec(ec);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(zone, 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 (_camera_check(ec))
- _unlock_rot_for_fg_app(ec->zone);
+ _unlock_rot_for_fg_app(zone);
else
- _try_lock_rot_for_fg_app(ec->zone);
+ _try_lock_rot_for_fg_app(zone);
}
}
- _e_client_rotation_zone_set(ec->zone, ec, NULL);
+ _e_client_rotation_zone_set(zone, ec, NULL);
if (ec->changes.rotation)
{
EDBG(ec, "Postpone show: ang %d", ec->e.state.rot.ang.next);
static Eina_Bool
_rot_intercept_hook_hide(void *d EINA_UNUSED, E_Client *ec)
{
+ E_Zone *zone;
+
// TODO: Add VKBD Hide, VKBD Parent Hide routine.
// clear pending_show, because this window is hidden now.
ec->e.state.rot.pending_show = 0;
+ zone = e_comp_zone_find_by_ec(ec);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(zone, EINA_TRUE);
+
if (fg_ec == ec)
{
EDBG(ec, "Set the fg_ec to NULL");
fg_ec = NULL;
if (_camera_check(ec))
- _try_lock_rot_for_fg_app(ec->zone);
+ _try_lock_rot_for_fg_app(zone);
}
// for rotating ec in the force_update_list
- _e_client_rotation_zone_set(ec->zone, fg_ec, ec);
+ _e_client_rotation_zone_set(zone, fg_ec, ec);
return EINA_TRUE;
}
else if (n > 1)
{
Eina_Bool rot_block = EINA_FALSE;
+ E_Zone *zone;
EINA_LIST_FOREACH(rot.list, l, ec)
{
- if (!ec->zone) continue;
- if (ec->zone->rot.block.mod_count)
+ zone = e_comp_zone_find_by_ec(ec);
+ if (!zone) continue;
+
+ if (zone->rot.block.mod_count)
{
rot_block = EINA_TRUE;
}
{
EINA_LIST_FREE(rot.async_list, ec)
{
- if (!eina_list_data_find(zlist, ec->zone))
- zlist = eina_list_append(zlist, ec->zone);
- _e_client_rotation_change_message_send(ec);
+ zone = e_comp_zone_find_by_ec(ec);
+ if (zone)
+ {
+ if (!eina_list_data_find(zlist, zone))
+ zlist = eina_list_append(zlist, zone);
+ _e_client_rotation_change_message_send(ec);
+ }
}
EINA_LIST_FOREACH(zlist, l, zone)