discomfitor pushed a commit to branch enlightenment-0.21. http://git.enlightenment.org/core/enlightenment.git/commit/?id=bc9103ec6811524de4cb2f1681ee77f557a1956c
commit bc9103ec6811524de4cb2f1681ee77f557a1956c Author: Mike Blumenkrantz <zm...@osg.samsung.com> Date: Fri Jan 13 11:35:26 2017 -0500 use persistent clipping for comp object input rects it's technically legal to set an input region larger than a surface, then later expand the surface and expect that the input region will also expand --- src/bin/e_comp_object.c | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/src/bin/e_comp_object.c b/src/bin/e_comp_object.c index c9457ce..deddc9f 100644 --- a/src/bin/e_comp_object.c +++ b/src/bin/e_comp_object.c @@ -2430,6 +2430,21 @@ _e_comp_smart_del(Evas_Object *obj) } static void +_e_comp_object_input_rect_update(E_Comp_Object *cw) +{ + int x, y, w, h; + + if (!cw->input_obj) return; + x = cw->input_rect.x, y = cw->input_rect.y, w = cw->input_rect.w, h = cw->input_rect.h; + + E_RECTS_CLIP_TO_RECT(x, y, w, h, 0, 0, cw->ec->client.w, cw->ec->client.h); + evas_object_geometry_set(cw->input_obj, + cw->x + x + (!!cw->frame_object * cw->client_inset.l), + cw->y + y + (!!cw->frame_object * cw->client_inset.t), + w, h); +} + +static void _e_comp_smart_move(Evas_Object *obj, int x, int y) { Eina_List *l; @@ -2445,10 +2460,7 @@ _e_comp_smart_move(Evas_Object *obj, int x, int y) evas_object_move(cw->clip, 0, 0); evas_object_move(cw->effect_obj, x, y); if (cw->input_obj) - evas_object_geometry_set(cw->input_obj, - cw->x + cw->input_rect.x + (!!cw->frame_object * cw->client_inset.l), - cw->y + cw->input_rect.y + (!!cw->frame_object * cw->client_inset.t), - cw->input_rect.w, cw->input_rect.h); + _e_comp_object_input_rect_update(cw); /* this gets called once during setup to init coords offscreen and guarantee first move */ if (e_comp && cw->visible) e_comp_shape_queue(); @@ -2493,10 +2505,7 @@ _e_comp_smart_resize(Evas_Object *obj, int w, int h) evas_object_resize(cw->effect_obj, w, h); if (cw->zoomobj) e_zoomap_child_resize(cw->zoomobj, pw, ph); if (cw->input_obj) - evas_object_geometry_set(cw->input_obj, - cw->x + cw->input_rect.x + (!!cw->frame_object * cw->client_inset.l), - cw->y + cw->input_rect.y + (!!cw->frame_object * cw->client_inset.t), - cw->input_rect.w, cw->input_rect.h); + _e_comp_object_input_rect_update(cw); /* resize render update tiler */ if (!first) { @@ -3123,7 +3132,6 @@ e_comp_object_input_area_set(Evas_Object *obj, int x, int y, int w, int h) API_ENTRY; //INF("%d,%d %dx%d", x, y, w, h); - E_RECTS_CLIP_TO_RECT(x, y, w, h, 0, 0, cw->ec->client.w, cw->ec->client.h); if ((cw->input_rect.x == x) && (cw->input_rect.y == y) && (cw->input_rect.w == w) && (cw->input_rect.h == h)) return; EINA_RECTANGLE_SET(&cw->input_rect, x, y, w, h); @@ -3138,9 +3146,7 @@ e_comp_object_input_area_set(Evas_Object *obj, int x, int y, int w, int h) evas_object_clip_set(cw->input_obj, cw->clip); evas_object_smart_member_add(cw->input_obj, obj); } - evas_object_geometry_set(cw->input_obj, - cw->ec->client.x + (!!cw->frame_object * cw->client_inset.l) + x, - cw->ec->client.y + (!!cw->frame_object * cw->client_inset.t) + y, w, h); + _e_comp_object_input_rect_update(cw); evas_object_pass_events_set(cw->obj, 1); if (cw->visible) evas_object_show(cw->input_obj); } --