forked from enlightenment/enlightenment
bugfix: screen limits policy no longer breaks X client positioning
this has been broken since it was added, and I strongly regret allowing it to be added.
This commit is contained in:
parent
ad8b4e6d4d
commit
d293b368b8
|
@ -2095,13 +2095,15 @@ e_client_idler_before(void)
|
|||
}
|
||||
|
||||
if ((!ec->new_client) && (!e_client_util_ignored_get(ec)) &&
|
||||
(!E_INSIDE(ec->x, ec->y, 0, 0, ec->zone->w - 5, ec->zone->h - 5)) &&
|
||||
(!E_INSIDE(ec->x, ec->y, 0 - ec->w + 5, 0 - ec->h + 5, ec->zone->w - 5, ec->zone->h - 5))
|
||||
(!E_INSIDE(ec->x, ec->y, 0, 0, ec->comp->man->w - 5, ec->comp->man->h - 5)) &&
|
||||
(!E_INSIDE(ec->x, ec->y, 0 - ec->w + 5, 0 - ec->h + 5, ec->comp->man->w - 5, ec->comp->man->h - 5))
|
||||
)
|
||||
{
|
||||
if (e_config->screen_limits != E_SCREEN_LIMITS_COMPLETELY)
|
||||
_e_client_move_lost_window_to_center(ec);
|
||||
}
|
||||
else
|
||||
e_client_zone_set(ec, e_comp_zone_xy_get(ec->comp, ec->x, ec->y));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1485,25 +1485,21 @@ _e_comp_x_configure_request(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore
|
|||
}
|
||||
else
|
||||
{
|
||||
if (ec->zone)
|
||||
{
|
||||
/* client is completely outside the zone, policy does not allow */
|
||||
if (((!E_INTERSECTS(x, y, ec->w, ec->h, ec->zone->x, ec->zone->y, ec->zone->w - 5, ec->zone->h - 5)) &&
|
||||
(e_config->screen_limits != E_SCREEN_LIMITS_COMPLETELY)) ||
|
||||
/* client is partly outside the zone, policy does not allow */
|
||||
(((!E_INSIDE(x, y, ec->zone->x, ec->zone->y, ec->zone->w - 5, ec->zone->h - 5)) &&
|
||||
(!E_INSIDE(x + ec->w, y, ec->zone->x, ec->zone->y, ec->zone->w - 5, ec->zone->h - 5)) &&
|
||||
(!E_INSIDE(x, y + ec->h, ec->zone->x, ec->zone->y, ec->zone->w - 5, ec->zone->h - 5)) &&
|
||||
(!E_INSIDE(x + ec->w, y + ec->h, ec->zone->x, ec->zone->y, ec->zone->w - 5, ec->zone->h - 5))) &&
|
||||
(e_config->screen_limits == E_SCREEN_LIMITS_WITHIN))
|
||||
)
|
||||
e_comp_object_util_center(ec->frame);
|
||||
else
|
||||
evas_object_move(ec->frame, x, y);
|
||||
}
|
||||
/* client is completely outside the screen, policy does not allow */
|
||||
if (((!E_INTERSECTS(x, y, ec->w, ec->h, ec->comp->man->x, ec->comp->man->y, ec->comp->man->w - 5, ec->comp->man->h - 5)) &&
|
||||
(e_config->screen_limits != E_SCREEN_LIMITS_COMPLETELY)) ||
|
||||
/* client is partly outside the zone, policy does not allow */
|
||||
(((!E_INSIDE(x, y, ec->comp->man->x, ec->comp->man->y, ec->comp->man->w - 5, ec->comp->man->h - 5)) &&
|
||||
(!E_INSIDE(x + ec->w, y, ec->comp->man->x, ec->comp->man->y, ec->comp->man->w - 5, ec->comp->man->h - 5)) &&
|
||||
(!E_INSIDE(x, y + ec->h, ec->comp->man->x, ec->comp->man->y, ec->comp->man->w - 5, ec->comp->man->h - 5)) &&
|
||||
(!E_INSIDE(x + ec->w, y + ec->h, ec->comp->man->x, ec->comp->man->y, ec->comp->man->w - 5, ec->comp->man->h - 5))) &&
|
||||
(e_config->screen_limits == E_SCREEN_LIMITS_WITHIN))
|
||||
)
|
||||
e_comp_object_util_center(ec->frame);
|
||||
else
|
||||
{
|
||||
evas_object_move(ec->frame, x, y);
|
||||
e_client_zone_set(ec, e_comp_zone_xy_get(ec->comp, x, y));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue