forked from enlightenment/efl
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.
This commit is contained in:
parent
f5f589429e
commit
c7cdcf4e0e
|
@ -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 *x = va_arg(*list, int *);
|
||||||
int *y = va_arg(*list, int *);
|
int *y = va_arg(*list, int *);
|
||||||
const Evas_Public_Data *e = _pd;
|
const Evas_Public_Data *e = _pd;
|
||||||
if (x) *x = e->pointer.x;
|
if (x) *x = e->pointer.x - e->framespace.x;
|
||||||
if (y) *y = e->pointer.y;
|
if (y) *y = e->pointer.y - e->framespace.y;
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
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 *);
|
Evas_Coord *y = va_arg(*list, Evas_Coord *);
|
||||||
|
|
||||||
const Evas_Public_Data *e = _pd;
|
const Evas_Public_Data *e = _pd;
|
||||||
if (x) *x = e->pointer.x;
|
if (x) *x = e->pointer.x - e->framespace.x;
|
||||||
if (y) *y = e->pointer.y;
|
if (y) *y = e->pointer.y - e->framespace.y;
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI int
|
EAPI int
|
||||||
|
|
Loading…
Reference in New Issue