jpeg pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=a087ca84b058a499f7bb834d8e39f509587d1baa
commit a087ca84b058a499f7bb834d8e39f509587d1baa Author: Jean-Philippe Andre <[email protected]> Date: Mon Jun 20 16:26:52 2016 +0900 ecore_evas: Try to fix mouse events on Windows See also de5f293426965f9dc19 and T3789 I wrongly assumed that multi.{x,y} would be properly set. I'm assuming here that multi.{x,y} == (0,0) means they are not set, and that double comparison to 0 works fine. --- src/lib/ecore_evas/ecore_evas.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/src/lib/ecore_evas/ecore_evas.c b/src/lib/ecore_evas/ecore_evas.c index fb225ad..01b01af 100644 --- a/src/lib/ecore_evas/ecore_evas.c +++ b/src/lib/ecore_evas/ecore_evas.c @@ -4304,10 +4304,17 @@ ecore_evas_psl1ght_new(const char* name, int w, int h) } while (0) static inline void -_pointer_position_set(Efl_Event_Pointer_Data *ev, Ecore_Evas *ee, double mx, double my) +_pointer_position_set(Efl_Event_Pointer_Data *ev, Ecore_Evas *ee, int x, int y, + double mx, double my) { int fx, fy, fw, fh; + if (!mx && !my) + { + mx = x; + my = y; + } + evas_output_framespace_get(ee->evas, &fx, &fy, &fw, &fh); if (ee->rotation == 0) EVENT_XY_SET(ev, mx, my, fx, fy); @@ -4368,7 +4375,7 @@ _direct_mouse_updown(Ecore_Evas *ee, const Ecore_Event_Mouse_Button *info, Efl_P if (info->triple_click) ev->button_flags |= EFL_POINTER_FLAGS_TRIPLE_CLICK; ev->timestamp = info->timestamp; ev->finger = info->multi.device; - _pointer_position_set(ev, ee, info->multi.x, info->multi.y); + _pointer_position_set(ev, ee, info->x, info->y, info->multi.x, info->multi.y); ev->radius = info->multi.radius; ev->radius_x = info->multi.radius_x; ev->radius_y = info->multi.radius_y; @@ -4425,7 +4432,7 @@ _direct_mouse_move_cb(Ecore_Evas *ee, const Ecore_Event_Mouse_Move *info) ev->action = EFL_POINTER_ACTION_MOVE; ev->timestamp = info->timestamp; ev->finger = info->multi.device; - _pointer_position_set(ev, ee, info->multi.x, info->multi.y); + _pointer_position_set(ev, ee, info->x, info->y, info->multi.x, info->multi.y); ev->radius = info->multi.radius; ev->radius_x = info->multi.radius_x; @@ -4461,7 +4468,7 @@ _direct_mouse_wheel_cb(Ecore_Evas *ee, const Ecore_Event_Mouse_Wheel *info) ev->action = EFL_POINTER_ACTION_WHEEL; ev->timestamp = info->timestamp; - _pointer_position_set(ev, ee, info->x, info->y); + _pointer_position_set(ev, ee, info->x, info->y, info->x, info->y); ev->wheel.z = info->z; ev->wheel.dir = info->direction ? EFL_ORIENT_HORIZONTAL : EFL_ORIENT_VERTICAL; @@ -4490,7 +4497,7 @@ _direct_mouse_inout(Ecore_Evas *ee, const Ecore_Event_Mouse_IO *info, Efl_Pointe ev->action = action; ev->timestamp = info->timestamp; - _pointer_position_set(ev, ee, info->x, info->y); + _pointer_position_set(ev, ee, info->x, info->y, info->x, info->y); eo_event_callback_call(e, _event_description_get(ev->action), evt); processed = ev->evas_done; --
