From c7cdcf4e0eaeb6908d442abe5105b6c3a5049149 Mon Sep 17 00:00:00 2001 From: Rafael Antognolli Date: Wed, 27 Mar 2013 17:18:09 -0300 Subject: [PATCH] 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 add796c463..1dc3abbdb5 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