antognolli pushed a commit to branch master.

commit c7cdcf4e0eaeb6908d442abe5105b6c3a5049149
Author: Rafael Antognolli <[email protected]>
Date:   Wed Mar 27 17:18:09 2013 -0300

    evas/wayland: Take framespace offsets into account on pointer_xy_get().
    
    Applications using these functions should not know of any offset. This
    patch makes the canvas pointer position to be returned exactly the same
    as on X11 backends.
---
 src/lib/evas/canvas/evas_main.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/lib/evas/canvas/evas_main.c b/src/lib/evas/canvas/evas_main.c
index add796c..1dc3abb 100644
--- a/src/lib/evas/canvas/evas_main.c
+++ b/src/lib/evas/canvas/evas_main.c
@@ -732,8 +732,8 @@ _canvas_pointer_output_xy_get(Eo *eo_e EINA_UNUSED, void 
*_pd, va_list *list)
    int *x = va_arg(*list, int *);
    int *y = va_arg(*list, int *);
    const Evas_Public_Data *e = _pd;
-   if (x) *x = e->pointer.x;
-   if (y) *y = e->pointer.y;
+   if (x) *x = e->pointer.x - e->framespace.x;
+   if (y) *y = e->pointer.y - e->framespace.y;
 }
 
 EAPI void
@@ -754,8 +754,8 @@ _canvas_pointer_canvas_xy_get(Eo *eo_e EINA_UNUSED, void 
*_pd, va_list *list)
    Evas_Coord *y = va_arg(*list, Evas_Coord *);
 
    const Evas_Public_Data *e = _pd;
-   if (x) *x = e->pointer.x;
-   if (y) *y = e->pointer.y;
+   if (x) *x = e->pointer.x - e->framespace.x;
+   if (y) *y = e->pointer.y - e->framespace.y;
 }
 
 EAPI int

-- 

------------------------------------------------------------------------------
Minimize network downtime and maximize team effectiveness.
Reduce network management and security costs.Learn how to hire 
the most talented Cisco Certified professionals. Visit the 
Employer Resources Portal
http://www.cisco.com/web/learning/employer_resources/index.html

Reply via email to