ev->data = (void *) data;
ev->timestamp = timestamp;
ev->device = efl_ref(device ? device : _evas_event_legacy_device_get(eo_e, EINA_TRUE));
+ //TIZEN_ONLY(20180530): add storing last mouse device.
+ e->last_mouse = ev->device;
+ //
ev->action = down ? EFL_POINTER_ACTION_DOWN : EFL_POINTER_ACTION_UP;
ev->button = b;
ev->button_flags = flags;
ev->data = (void *) data;
ev->timestamp = timestamp;
ev->device = efl_ref(device ? device : _evas_event_legacy_device_get(eo_e, EINA_TRUE));
+ //TIZEN_ONLY(20180530): add storing last mouse device.
+ e->last_mouse = ev->device;
+ //
ev->action = down ? EFL_POINTER_ACTION_DOWN : EFL_POINTER_ACTION_UP;
ev->button = b;
ev->button_flags = flags;
ev->timestamp = timestamp;
ev->data = (void *) data;
- ev->device = efl_ref(_evas_event_legacy_device_get(e->evas, EINA_TRUE));
+ //TIZEN_ONLY(20180530): add storing last mouse device.
+ ev->device = efl_ref(e->last_mouse ? e->last_mouse : _evas_event_legacy_device_get(e->evas, EINA_TRUE));
+ //
_canvas_event_feed_mouse_cancel_internal(e, ev);
evas_event_feed_mouse_wheel(Eo *eo_e, int direction, int z, unsigned int timestamp, const void *data)
{
EINA_SAFETY_ON_FALSE_RETURN(efl_isa(eo_e, EVAS_CANVAS_CLASS));
+ //TIZEN_ONLY(20180530): add storing last mouse device.
+ Evas_Public_Data *e = efl_data_scope_get(eo_e, EVAS_CANVAS_CLASS);
+ //
Efl_Input_Pointer_Data *ev = NULL;
Efl_Input_Pointer *evt = efl_input_instance_get(EFL_INPUT_POINTER_CLASS, eo_e, (void **) &ev);
ev->wheel.z = z;
ev->timestamp = timestamp;
ev->data = (void *) data;
- ev->device = efl_ref(_evas_event_legacy_device_get(eo_e, EINA_TRUE));
+ //TIZEN_ONLY(20180530): add storing last mouse device.
+ ev->device = efl_ref(e->last_mouse ? e->last_mouse: _evas_event_legacy_device_get(eo_e, EINA_TRUE));
+ //
_canvas_event_feed_mouse_wheel_internal(eo_e, ev);
efl_unref(evt);
ev->data = (void *) data;
ev->timestamp = timestamp;
- ev->device = efl_ref(_evas_event_legacy_device_get(eo_e, EINA_TRUE));
+ //TIZEN_ONLY(20180530): add storing last mouse device.
+ ev->device = efl_ref(e->last_mouse ? e->last_mouse : _evas_event_legacy_device_get(eo_e, EINA_TRUE));
+ //
ev->cur.x = x;
ev->cur.y = y;
ev->data = (void *) data;
ev->timestamp = timestamp;
- ev->device = efl_ref(_evas_event_legacy_device_get(eo_e, EINA_TRUE));
+ //TIZEN_ONLY(20180530): add storing last mouse device.
+ ev->device = efl_ref(e->last_mouse ? e->last_mouse : _evas_event_legacy_device_get(eo_e, EINA_TRUE));
+ //
ev->cur.x = x;
ev->cur.y = y;
ev->radius = radius;
_canvas_event_feed_mouse_inout_legacy(Eo *eo_e, unsigned int timestamp,
const void *data, Eina_Bool in)
{
+ //TIZEN_ONLY(20180530): add storing last mouse device.
+ Evas_Public_Data *e = efl_data_scope_get(eo_e, EVAS_CANVAS_CLASS);
+ //
Efl_Input_Pointer_Data *ev = NULL;
Efl_Input_Pointer *evt;
ev->timestamp = timestamp;
ev->data = (void *) data;
- ev->device = efl_ref(_evas_event_legacy_device_get(eo_e, EINA_TRUE));
+ //TIZEN_ONLY(20180530): add storing last mouse device.
+ ev->device = efl_ref(e->last_mouse ? e->last_mouse : _evas_event_legacy_device_get(eo_e, EINA_TRUE));
+ //
if (in)
_canvas_event_feed_mouse_in_internal(eo_e, ev);
ev->button_flags = flags;
ev->timestamp = timestamp;
ev->data = (void *) data;
- ev->device = efl_ref(_evas_event_legacy_device_get(eo_e, EINA_TRUE));
+ //TIZEN_ONLY(20180530): add storing last mouse device.
+ ev->device = efl_ref(e->last_mouse ? e->last_mouse : _evas_event_legacy_device_get(eo_e, EINA_TRUE));
+ //
switch (action)
{
ev->data = (void *) data;
ev->timestamp = timestamp;
ev->event_flags = e->default_event_flags;
- ev->device = efl_ref(_evas_event_legacy_device_get(eo_e, EINA_TRUE));
+ //TIZEN_ONLY(20180530): add storing last mouse device.
+ ev->device = efl_ref(e->last_mouse ? e->last_mouse : _evas_event_legacy_device_get(eo_e, EINA_TRUE));
+ //
pdata = _evas_pointer_data_by_device_get(e, ev->device);
if (!pdata) return;
ev->modifiers = &e->modifiers;
ev->locks = &e->locks;
+ //TIZEN_ONLY(20180530): add storing last mouse device.
if (!ev->device)
{
nodev = 1;
- ev->device = _evas_event_legacy_device_get(e->evas, EINA_TRUE);
+ ev->device = efl_ref(e->last_mouse ? e->last_mouse : _evas_event_legacy_device_get(eo_e, EINA_TRUE));
}
+ else
+ e->last_mouse = ev->device;
+ //
switch (ev->action)
{