summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2017-01-12 10:44:23 -0500
committerChris Michael <cp.michael@samsung.com>2017-01-12 10:44:23 -0500
commit92aa99b97a90bb85176a5352cd5cb53070b5ae96 (patch)
tree416b7b9dd2dbd24d68d61a413d5aab673da23d69 /src
parent62f7d684dd28bc07e2b350ce6d2cd627291c905c (diff)
downloadenlightenment-92aa99b97a90bb85176a5352cd5cb53070b5ae96.tar.gz
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>
Diffstat (limited to 'src')
-rw-r--r--src/bin/e_bindings.c4
-rw-r--r--src/bin/e_comp_x.c6
-rw-r--r--src/bin/e_shelf.c4
3 files changed, 7 insertions, 7 deletions
diff --git a/src/bin/e_bindings.c b/src/bin/e_bindings.c
index 16de99806f..dc0c5b23b0 100644
--- a/src/bin/e_bindings.c
+++ b/src/bin/e_bindings.c
@@ -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);
diff --git a/src/bin/e_comp_x.c b/src/bin/e_comp_x.c
index 069e1b2600..1bc886dd36 100644
--- a/src/bin/e_comp_x.c
+++ b/src/bin/e_comp_x.c
@@ -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;
diff --git a/src/bin/e_shelf.c b/src/bin/e_shelf.c
index be2a3409ee..ec01cf3f3b 100644
--- a/src/bin/e_shelf.c
+++ b/src/bin/e_shelf.c
@@ -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)) ||