Use proper coordinate adjustment

This seems like just some copy/paste that was never corrected, however
when calculating coordinate adjustments we should be using the proper
values here. Previous code was using e_comp_canvas_x_root_adjust for
the Y value. This patch uses e_comp_canvas_y_root_adjust for Y
coordinates.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
Chris Michael 2017-01-12 10:44:23 -05:00
parent 62f7d684dd
commit 92aa99b97a
3 changed files with 7 additions and 7 deletions

View File

@ -125,7 +125,7 @@ e_bindings_ecore_event_mouse_wheel_convert(const Ecore_Event_Mouse_Wheel *ev, E_
event->direction = ev->direction;
event->z = ev->z;
event->canvas.x = e_comp_canvas_x_root_adjust(ev->root.x);
event->canvas.y = e_comp_canvas_x_root_adjust(ev->root.y);
event->canvas.y = e_comp_canvas_y_root_adjust(ev->root.y);
event->timestamp = ev->timestamp;
event->modifiers = _e_bindings_modifiers(ev->modifiers);
}
@ -136,7 +136,7 @@ e_bindings_ecore_event_mouse_button_convert(const Ecore_Event_Mouse_Button *ev,
memset(event, 0, sizeof(E_Binding_Event_Mouse_Button));
event->button = ev->buttons;
event->canvas.x = e_comp_canvas_x_root_adjust(ev->root.x);
event->canvas.y = e_comp_canvas_x_root_adjust(ev->root.y);
event->canvas.y = e_comp_canvas_y_root_adjust(ev->root.y);
event->timestamp = ev->timestamp;
event->modifiers = _e_bindings_modifiers(ev->modifiers);

View File

@ -2362,7 +2362,7 @@ static void
_e_comp_x_mouse_in_job(void *d EINA_UNUSED)
{
if (mouse_client)
e_client_mouse_in(mouse_client, e_comp_canvas_x_root_adjust(mouse_in_coords.x), e_comp_canvas_x_root_adjust(mouse_in_coords.y));
e_client_mouse_in(mouse_client, e_comp_canvas_x_root_adjust(mouse_in_coords.x), e_comp_canvas_y_root_adjust(mouse_in_coords.y));
mouse_in_job = NULL;
}
@ -2420,7 +2420,7 @@ _e_comp_x_mouse_out(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore_X_Event_
E_FREE_FUNC(mouse_in_job, ecore_job_del);
}
if (ec->mouse.in)
e_client_mouse_out(ec, e_comp_canvas_x_root_adjust(ev->root.x), e_comp_canvas_x_root_adjust(ev->root.y));
e_client_mouse_out(ec, e_comp_canvas_x_root_adjust(ev->root.x), e_comp_canvas_y_root_adjust(ev->root.y));
return ECORE_CALLBACK_RENEW;
}
@ -2519,7 +2519,7 @@ _e_comp_x_mouse_move(void *d EINA_UNUSED, int t EINA_UNUSED, Ecore_Event_Mouse_M
if (top == e_comp->ee_win) return ECORE_CALLBACK_RENEW;
x = e_comp_canvas_x_root_adjust(ev->root.x);
y = e_comp_canvas_x_root_adjust(ev->root.y);
y = e_comp_canvas_y_root_adjust(ev->root.y);
for (tec = e_client_above_get(ec); tec; tec = e_client_above_get(tec))
{
if (!evas_object_visible_get(tec->frame)) continue;

View File

@ -1911,10 +1911,10 @@ _e_shelf_cb_mouse_in(void *data, int type, void *event)
* back to mouse in/out events
*/
inside = E_INSIDE(e_comp_canvas_x_root_adjust(ev->root.x),
e_comp_canvas_x_root_adjust(ev->root.y),
e_comp_canvas_y_root_adjust(ev->root.y),
es->zone->x, es->zone->y, es->zone->w + 4, es->zone->h + 4);
x = e_comp_canvas_x_root_adjust(ev->root.x) - es->zone->x;
y = e_comp_canvas_x_root_adjust(ev->root.y) - es->zone->y;
y = e_comp_canvas_y_root_adjust(ev->root.y) - es->zone->y;
if (inside)
inside = (
((E_INSIDE(x, y, es->x, es->y, es->w, es->h)) ||