set client input rects more accurately, accounting for SSD

This commit is contained in:
Mike Blumenkrantz 2015-10-22 19:24:11 -04:00
parent 6f455ac9c3
commit 6692cefaf5
1 changed files with 12 additions and 5 deletions

View File

@ -2293,7 +2293,10 @@ _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->y + cw->input_rect.y, cw->input_rect.w, cw->input_rect.h);
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);
/* this gets called once during setup to init coords offscreen and guarantee first move */
if (e_comp && cw->visible)
e_comp_shape_queue();
@ -2333,7 +2336,10 @@ _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->y + cw->input_rect.y, cw->input_rect.w, cw->input_rect.h);
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);
/* resize render update tiler */
if (!first)
{
@ -2899,7 +2905,7 @@ e_comp_object_input_area_set(Evas_Object *obj, int x, int y, int w, int 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);
if (x || y || (w != cw->w) || (h != cw->h))
if (x || y || (w != cw->ec->client.w) || (h != cw->ec->client.h))
{
if (!cw->input_obj)
{
@ -2910,8 +2916,9 @@ 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, MAX(cw->x, 0) + x, MAX(cw->y, 0) + y, w, h);
evas_object_layer_set(cw->input_obj, 9999);
evas_object_geometry_set(cw->input_obj,
MAX(cw->ec->client.x + (!!cw->frame_object * cw->client_inset.l), 0) + x,
MAX(cw->ec->client.y + (!!cw->frame_object * cw->client_inset.t), 0) + y, w, h);
evas_object_pass_events_set(cw->obj, 1);
if (cw->visible) evas_object_show(cw->input_obj);
}