evas: Fix mouse event info for legacy events.

Summary:
Legacy event info have canvas and output coordinates.
Output coordinates have information of original position.
Canvas coordinates have information of transformed position.
So keep backward compatibility, fix filling legacy information.

This reverts commit 7f724f6c5d

Reviewers: Hermet, zmike

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11445
This commit is contained in:
Hosang Kim 2020-03-04 09:35:30 -05:00 committed by Mike Blumenkrantz
parent b847348699
commit 9ea61428db
1 changed files with 6 additions and 3 deletions

View File

@ -34,15 +34,18 @@ efl_input_pointer_legacy_info_fill(Evas *eo_evas, Efl_Input_Key *eo_ev, Evas_Cal
{
Efl_Input_Pointer_Data *ev = efl_data_scope_get(eo_ev, EFL_INPUT_POINTER_CLASS);
Evas_Public_Data *evas;
Evas_Pointer_Data *pdata;
if (!ev) return NULL;
if (!eo_evas) eo_evas = efl_provider_find(eo_ev, EVAS_CANVAS_CLASS);
evas = efl_data_scope_get(eo_evas, EVAS_CANVAS_CLASS);
if (!evas) return NULL;
pdata = _evas_pointer_data_by_device_get(evas, ev->device);
EINA_SAFETY_ON_NULL_RETURN_VAL(pdata, NULL);
#define COORD_DUP(e) do { (e)->output.x = (e)->canvas.x; (e)->output.y = (e)->canvas.y; } while (0)
#define COORD_DUP_CUR(e) do { (e)->cur.output.x = (e)->cur.canvas.x; (e)->cur.output.y = (e)->cur.canvas.y; } while (0)
#define COORD_DUP_PREV(e) do { (e)->prev.output.x = (e)->prev.canvas.x; (e)->prev.output.y = (e)->prev.canvas.y; } while (0)
#define COORD_DUP(e) do { (e)->output.x = pdata->seat->x; (e)->output.y = pdata->seat->y; } while (0)
#define COORD_DUP_CUR(e) do { (e)->cur.output.x = pdata->seat->x; (e)->cur.output.y = pdata->seat->y; } while (0)
#define COORD_DUP_PREV(e) do { (e)->prev.output.x = pdata->seat->prev.x; (e)->prev.output.y = pdata->seat->prev.y; } while (0)
#define TYPE_CHK(typ) do { if ((type != EVAS_CALLBACK_LAST) && (type != EVAS_CALLBACK_ ## typ)) return NULL; } while (0)
switch (ev->action)