zmike pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=9ea61428db639a8e6d666885fe245e9f753bbe7c

commit 9ea61428db639a8e6d666885fe245e9f753bbe7c
Author: Hosang Kim <hosang12....@samsung.com>
Date:   Wed Mar 4 09:35:30 2020 -0500

    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 7f724f6c5db1127a6dd5786791f495b58910e9a9
    
    Reviewers: Hermet, zmike
    
    Reviewed By: zmike
    
    Subscribers: cedric, #reviewers, #committers
    
    Tags: #efl
    
    Differential Revision: https://phab.enlightenment.org/D11445
---
 src/lib/evas/canvas/evas_events_legacy.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/lib/evas/canvas/evas_events_legacy.c 
b/src/lib/evas/canvas/evas_events_legacy.c
index 1204800631..4d574d0209 100644
--- a/src/lib/evas/canvas/evas_events_legacy.c
+++ b/src/lib/evas/canvas/evas_events_legacy.c
@@ -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)

-- 


Reply via email to