discomfitor pushed a commit to branch enlightenment-0.21.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=0ba8bf56c5b3fd59e04d593d4b655c544d9fed1c

commit 0ba8bf56c5b3fd59e04d593d4b655c544d9fed1c
Author: Chris Michael <[email protected]>
Date:   Thu Jan 12 10:44:23 2017 -0500

    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 <[email protected]>
---
 src/bin/e_bindings.c | 4 ++--
 src/bin/e_comp_x.c   | 6 +++---
 src/bin/e_shelf.c    | 4 ++--
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/bin/e_bindings.c b/src/bin/e_bindings.c
index 543d7de..52e28d5 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 497d760..1668f7c 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 64c82bd..30eecd8 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)) ||

-- 


Reply via email to