forked from enlightenment/enlightenment
deduplicate zone move/resize code
This commit is contained in:
parent
e5f60c6aee
commit
519cf154fa
|
@ -294,29 +294,9 @@ e_zone_move(E_Zone *zone,
|
|||
int x,
|
||||
int y)
|
||||
{
|
||||
E_Event_Zone_Move_Resize *ev;
|
||||
int dx, dy;
|
||||
|
||||
E_OBJECT_CHECK(zone);
|
||||
E_OBJECT_TYPE_CHECK(zone, E_ZONE_TYPE);
|
||||
|
||||
if ((x == zone->x) && (y == zone->y)) return;
|
||||
dx = x - zone->x;
|
||||
dy = y - zone->y;
|
||||
zone->x = x;
|
||||
zone->y = y;
|
||||
evas_object_move(zone->bg_object, x, y);
|
||||
evas_object_move(zone->bg_event_object, x, y);
|
||||
evas_object_move(zone->bg_clip_object, x, y);
|
||||
|
||||
ev = E_NEW(E_Event_Zone_Move_Resize, 1);
|
||||
ev->zone = zone;
|
||||
e_object_ref(E_OBJECT(ev->zone));
|
||||
ecore_event_add(E_EVENT_ZONE_MOVE_RESIZE, ev, _e_zone_event_generic_free, NULL);
|
||||
|
||||
_e_zone_edge_move_resize(zone);
|
||||
e_zone_bg_reconfigure(zone);
|
||||
e_zone_reconfigure_clients(zone, dx, dy);
|
||||
e_zone_move_resize(zone, x, y, zone->w, zone->h);
|
||||
}
|
||||
|
||||
E_API void
|
||||
|
@ -324,28 +304,9 @@ e_zone_resize(E_Zone *zone,
|
|||
int w,
|
||||
int h)
|
||||
{
|
||||
E_Event_Zone_Move_Resize *ev;
|
||||
|
||||
E_OBJECT_CHECK(zone);
|
||||
E_OBJECT_TYPE_CHECK(zone, E_ZONE_TYPE);
|
||||
|
||||
if ((w == zone->w) && (h == zone->h)) return;
|
||||
|
||||
zone->w = w;
|
||||
zone->h = h;
|
||||
evas_object_resize(zone->bg_object, w, h);
|
||||
evas_object_resize(zone->bg_event_object, w, h);
|
||||
evas_object_resize(zone->bg_clip_object, w, h);
|
||||
|
||||
ev = E_NEW(E_Event_Zone_Move_Resize, 1);
|
||||
ev->zone = zone;
|
||||
e_object_ref(E_OBJECT(ev->zone));
|
||||
ecore_event_add(E_EVENT_ZONE_MOVE_RESIZE, ev,
|
||||
_e_zone_event_generic_free, NULL);
|
||||
|
||||
_e_zone_edge_move_resize(zone);
|
||||
e_zone_bg_reconfigure(zone);
|
||||
e_zone_reconfigure_clients(zone, 0, 0);
|
||||
e_zone_move_resize(zone, zone->x, zone->y, w, h);
|
||||
}
|
||||
|
||||
E_API Eina_Bool
|
||||
|
|
Loading…
Reference in New Issue