summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2016-08-17 20:29:39 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2016-08-26 10:18:00 +0900
commit56c682452c17134959cb07bc290d9d7d059026e3 (patch)
treec6687dc17cdef6773a823a11ae1c54b778502a00 /src
parentc1e7589c14af9561273d7fca02e7e8ab15b831d1 (diff)
evas events: Switch mouse up/down to the new event type
This is getting trickier, as those events have a lot more side effects and complexity than a simple wheel event... Some code has been added that should be fixed in the following commits.
Diffstat (limited to 'src')
-rw-r--r--src/lib/evas/canvas/evas_callbacks.c68
-rw-r--r--src/lib/evas/canvas/evas_events.c421
2 files changed, 233 insertions, 256 deletions
diff --git a/src/lib/evas/canvas/evas_callbacks.c b/src/lib/evas/canvas/evas_callbacks.c
index cdc20afc53..de8d566dd4 100644
--- a/src/lib/evas/canvas/evas_callbacks.c
+++ b/src/lib/evas/canvas/evas_callbacks.c
@@ -261,6 +261,7 @@ evas_object_event_callback_call(Evas_Object *eo_obj, Evas_Object_Protected_Data
261 const Efl_Event_Description *efl_event_desc, Efl_Event *efl_event_info) 261 const Efl_Event_Description *efl_event_desc, Efl_Event *efl_event_info)
262{ 262{
263 /* MEM OK */ 263 /* MEM OK */
264 const Evas_Button_Flags mask = EVAS_BUTTON_DOUBLE_CLICK | EVAS_BUTTON_TRIPLE_CLICK;
264 Evas_Button_Flags flags = EVAS_BUTTON_NONE; 265 Evas_Button_Flags flags = EVAS_BUTTON_NONE;
265 Evas_Public_Data *e; 266 Evas_Public_Data *e;
266 267
@@ -286,44 +287,15 @@ evas_object_event_callback_call(Evas_Object *eo_obj, Evas_Object_Protected_Data
286 if ((type == EVAS_CALLBACK_MOVE) && (obj->move_ref == 0)) 287 if ((type == EVAS_CALLBACK_MOVE) && (obj->move_ref == 0))
287 goto nothing_here; 288 goto nothing_here;
288 289
289 switch (type) 290 if ((type == EVAS_CALLBACK_MOUSE_DOWN) || (type == EVAS_CALLBACK_MOUSE_UP))
290 { 291 {
291 case EVAS_CALLBACK_MOUSE_DOWN: 292 flags = efl_event_pointer_button_flags_get(efl_event_info);
292 { 293 if (flags & mask)
293 Evas_Event_Mouse_Down *ev = event_info; 294 {
294 295 if (obj->last_mouse_down_counter < (e->last_mouse_down_counter - 1))
295 flags = ev->flags; 296 efl_event_pointer_button_flags_set(efl_event_info, flags & ~mask);
296 if (ev->flags & (EVAS_BUTTON_DOUBLE_CLICK | EVAS_BUTTON_TRIPLE_CLICK)) 297 }
297 { 298 obj->last_mouse_down_counter = e->last_mouse_down_counter;
298 if (obj->last_mouse_down_counter < (e->last_mouse_down_counter - 1))
299 ev->flags &= ~(EVAS_BUTTON_DOUBLE_CLICK | EVAS_BUTTON_TRIPLE_CLICK);
300 }
301 obj->last_mouse_down_counter = e->last_mouse_down_counter;
302 if (efl_event_info)
303 {
304 efl_event_pointer_button_flags_set(efl_event_info, ev->flags);
305 }
306 break;
307 }
308 case EVAS_CALLBACK_MOUSE_UP:
309 {
310 Evas_Event_Mouse_Up *ev = event_info;
311
312 flags = ev->flags;
313 if (ev->flags & (EVAS_BUTTON_DOUBLE_CLICK | EVAS_BUTTON_TRIPLE_CLICK))
314 {
315 if (obj->last_mouse_up_counter < (e->last_mouse_up_counter - 1))
316 ev->flags &= ~(EVAS_BUTTON_DOUBLE_CLICK | EVAS_BUTTON_TRIPLE_CLICK);
317 }
318 obj->last_mouse_up_counter = e->last_mouse_up_counter;
319 if (efl_event_info)
320 {
321 efl_event_pointer_button_flags_set(efl_event_info, ev->flags);
322 }
323 break;
324 }
325 default:
326 break;
327 } 299 }
328 300
329 if (_evas_event_efl_event_info_exists(type)) 301 if (_evas_event_efl_event_info_exists(type))
@@ -332,28 +304,12 @@ evas_object_event_callback_call(Evas_Object *eo_obj, Evas_Object_Protected_Data
332 } 304 }
333 else 305 else
334 { 306 {
335 /* legacy callbacks - relying on Efl.Canvas.Object events */
336 efl_event_callback_call(eo_obj, _legacy_evas_callback_table(type), event_info); 307 efl_event_callback_call(eo_obj, _legacy_evas_callback_table(type), event_info);
337 308 if (efl_event_desc) CRI("Internal error with events!"); // FIXME
338 /* new input events - unlikely */
339 if (efl_event_desc)
340 efl_event_callback_call(eo_obj, efl_event_desc, efl_event_info);
341 } 309 }
342 310
343 if (type == EVAS_CALLBACK_MOUSE_DOWN) 311 if ((type == EVAS_CALLBACK_MOUSE_DOWN) || (type == EVAS_CALLBACK_MOUSE_UP))
344 { 312 efl_event_pointer_button_flags_set(efl_event_info, flags);
345 Evas_Event_Mouse_Down *ev = event_info;
346 ev->flags = flags;
347 if (efl_event_info)
348 efl_event_pointer_button_flags_set(efl_event_info, ev->flags);
349 }
350 else if (type == EVAS_CALLBACK_MOUSE_UP)
351 {
352 Evas_Event_Mouse_Up *ev = event_info;
353 ev->flags = flags;
354 if (efl_event_info)
355 efl_event_pointer_button_flags_set(efl_event_info, ev->flags);
356 }
357 313
358 nothing_here: 314 nothing_here:
359 if (!obj->no_propagate) 315 if (!obj->no_propagate)
diff --git a/src/lib/evas/canvas/evas_events.c b/src/lib/evas/canvas/evas_events.c
index 6ea584618d..db4ac4cd41 100644
--- a/src/lib/evas/canvas/evas_events.c
+++ b/src/lib/evas/canvas/evas_events.c
@@ -505,28 +505,30 @@ _transform_to_src_space_f(Evas_Object_Protected_Data *obj, Evas_Object_Protected
505 505
506static void 506static void
507_evas_event_source_mouse_down_events(Evas_Object *eo_obj, Evas *eo_e, 507_evas_event_source_mouse_down_events(Evas_Object *eo_obj, Evas *eo_e,
508 Evas_Event_Mouse_Down *ev, int event_id, 508 Efl_Event_Pointer *parent_ev, int event_id)
509 Efl_Event_Pointer *parent_pe)
510{ 509{
511 Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS); 510 Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS);
512 Evas_Object *eo_src = _evas_object_image_source_get(eo_obj); 511 Evas_Object *eo_src = _evas_object_image_source_get(eo_obj);
513 Evas_Object_Protected_Data *src = efl_data_scope_get(eo_src, EFL_CANVAS_OBJECT_CLASS); 512 Evas_Object_Protected_Data *src = efl_data_scope_get(eo_src, EFL_CANVAS_OBJECT_CLASS);
514 Evas_Public_Data *e = efl_data_scope_get(eo_e, EVAS_CANVAS_CLASS); 513 Evas_Public_Data *e = efl_data_scope_get(eo_e, EVAS_CANVAS_CLASS);
515 Evas_Coord_Point canvas = ev->canvas;
516 Evas_Object_Protected_Data *child; 514 Evas_Object_Protected_Data *child;
517 Efl_Event_Pointer *pe = NULL;
518 Evas_Object *eo_child; 515 Evas_Object *eo_child;
519 Eina_List *l; 516 Eina_List *copy, *l;
520 int no_rep = 0; 517 Efl_Event_Pointer_Data *ev;
518 Efl_Event_Pointer *evt;
519 Eina_Vector2 point;
521 int addgrab = 0; 520 int addgrab = 0;
522 Evas_Coord_Point point; 521 int no_rep = 0;
523 Eina_List *copy;
524 522
525 if (obj->delete_me || src->delete_me || e->is_frozen) return; 523 if (obj->delete_me || src->delete_me || e->is_frozen) return;
526 524
527 _transform_to_src_space(obj, src, &ev->canvas.x, &ev->canvas.y); 525 evt = efl_event_dup(parent_ev);
526 ev = efl_data_scope_get(evt, EFL_EVENT_POINTER_CLASS);
527 if (!ev) return;
528 528
529 ev->event_src = eo_obj; 529 _transform_to_src_space_f(obj, src, &ev->cur);
530 point = ev->cur;
531 ev->source = eo_obj;
530 532
531 EINA_COW_WRITE_BEGIN(evas_object_proxy_cow, src->proxy, Evas_Object_Proxy_Data, proxy_write) 533 EINA_COW_WRITE_BEGIN(evas_object_proxy_cow, src->proxy, Evas_Object_Proxy_Data, proxy_write)
532 { 534 {
@@ -538,7 +540,7 @@ _evas_event_source_mouse_down_events(Evas_Object *eo_obj, Evas *eo_e,
538 proxy_write->src_event_in = _evas_event_object_list_raw_in_get 540 proxy_write->src_event_in = _evas_event_object_list_raw_in_get
539 (eo_e, proxy_write->src_event_in, 541 (eo_e, proxy_write->src_event_in,
540 evas_object_smart_members_get_direct(eo_src), 542 evas_object_smart_members_get_direct(eo_src),
541 NULL, ev->canvas.x, ev->canvas.y, &no_rep, EINA_TRUE); 543 NULL, ev->cur.x, ev->cur.y, &no_rep, EINA_TRUE);
542 } 544 }
543 else 545 else
544 proxy_write->src_event_in = eina_list_append(proxy_write->src_event_in, eo_src); 546 proxy_write->src_event_in = eina_list_append(proxy_write->src_event_in, eo_src);
@@ -564,23 +566,21 @@ _evas_event_source_mouse_down_events(Evas_Object *eo_obj, Evas *eo_e,
564 } 566 }
565 } 567 }
566 568
567 point = ev->canvas;
568 copy = evas_event_list_copy(src->proxy->src_event_in); 569 copy = evas_event_list_copy(src->proxy->src_event_in);
569 EINA_LIST_FOREACH(copy, l, eo_child) 570 EINA_LIST_FOREACH(copy, l, eo_child)
570 { 571 {
571 child = efl_data_scope_get(eo_child, EFL_CANVAS_OBJECT_CLASS); 572 child = efl_data_scope_get(eo_child, EFL_CANVAS_OBJECT_CLASS);
572 ev->canvas = point; 573 ev->cur = point;
573 _evas_event_havemap_adjust(eo_child, child, &ev->canvas.x, 574 _evas_event_havemap_adjust_f(eo_child, child, &ev->cur, child->mouse_grabbed);
574 &ev->canvas.y, 575 evas_object_event_callback_call(eo_child, child, EVAS_CALLBACK_MOUSE_DOWN, NULL,
575 child->mouse_grabbed); 576 event_id, EFL_EVENT_POINTER_DOWN, evt);
576 EV_CALL(eo_child, child, EVAS_CALLBACK_MOUSE_DOWN, ev, event_id, pe, parent_pe);
577 if (e->delete_me) break; 577 if (e->delete_me) break;
578 if (obj->pointer_mode == EVAS_OBJECT_POINTER_MODE_NOGRAB_NO_REPEAT_UPDOWN) 578 if (obj->pointer_mode == EVAS_OBJECT_POINTER_MODE_NOGRAB_NO_REPEAT_UPDOWN)
579 break; 579 break;
580 } 580 }
581 eina_list_free(copy); 581 eina_list_free(copy);
582 ev->canvas = canvas; 582
583 EV_DEL(pe); 583 efl_del(evt);
584} 584}
585 585
586static void 586static void
@@ -758,28 +758,30 @@ _evas_event_source_mouse_move_events(Evas_Object *eo_obj, Evas *eo_e,
758 758
759static void 759static void
760_evas_event_source_mouse_up_events(Evas_Object *eo_obj, Evas *eo_e, 760_evas_event_source_mouse_up_events(Evas_Object *eo_obj, Evas *eo_e,
761 Evas_Event_Mouse_Up *ev, int event_id, 761 Efl_Event_Pointer *parent_ev, int event_id)
762 Efl_Event_Pointer *parent_pe)
763{ 762{
764 Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS); 763 Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS);
765 Evas_Object *eo_src = _evas_object_image_source_get(eo_obj); 764 Evas_Object *eo_src = _evas_object_image_source_get(eo_obj);
766 Evas_Object_Protected_Data *src = efl_data_scope_get(eo_src, EFL_CANVAS_OBJECT_CLASS); 765 Evas_Object_Protected_Data *src = efl_data_scope_get(eo_src, EFL_CANVAS_OBJECT_CLASS);
767 Evas_Public_Data *e = efl_data_scope_get(eo_e, EVAS_CANVAS_CLASS); 766 Evas_Public_Data *e = efl_data_scope_get(eo_e, EVAS_CANVAS_CLASS);
768 Evas_Coord_Point canvas = ev->canvas; 767 Evas_Object_Protected_Data *child;
769 Efl_Event_Pointer *pe = NULL; 768 Evas_Object *eo_child;
769 Eina_List *copy, *l;
770 Efl_Event_Pointer_Data *ev;
771 Efl_Event_Pointer *evt;
772 Eina_Vector2 point;
770 773
771 if (obj->delete_me || src->delete_me || e->is_frozen) return; 774 if (obj->delete_me || src->delete_me || e->is_frozen) return;
772 775
773 _transform_to_src_space(obj, src, &ev->canvas.x, &ev->canvas.y); 776 evt = efl_event_dup(parent_ev);
774 777 ev = efl_data_scope_get(evt, EFL_EVENT_POINTER_CLASS);
775 ev->event_src = eo_obj; 778 if (!ev) return;
776 779
777 Eina_List *l; 780 _transform_to_src_space_f(obj, src, &ev->cur);
778 Evas_Object *eo_child; 781 point = ev->cur;
779 Evas_Object_Protected_Data *child; 782 ev->source = eo_obj;
780 Evas_Coord_Point point = ev->canvas;
781 783
782 Eina_List *copy = evas_event_list_copy(src->proxy->src_event_in); 784 copy = evas_event_list_copy(src->proxy->src_event_in);
783 EINA_LIST_FOREACH(copy, l, eo_child) 785 EINA_LIST_FOREACH(copy, l, eo_child)
784 { 786 {
785 if (src->delete_me) break; 787 if (src->delete_me) break;
@@ -792,12 +794,10 @@ _evas_event_source_mouse_up_events(Evas_Object *eo_obj, Evas *eo_e,
792 e->pointer.mouse_grabbed--; 794 e->pointer.mouse_grabbed--;
793 } 795 }
794 796
795 ev->canvas = point; 797 ev->cur = point;
796 _evas_event_havemap_adjust(eo_child, child, 798 _evas_event_havemap_adjust_f(eo_child, child, &ev->cur, child->mouse_grabbed);
797 &ev->canvas.x, 799 evas_object_event_callback_call(eo_child, child, EVAS_CALLBACK_MOUSE_UP, NULL,
798 &ev->canvas.y, 800 event_id, EFL_EVENT_POINTER_UP, evt);
799 child->mouse_grabbed);
800 EV_CALL(eo_child, child, EVAS_CALLBACK_MOUSE_UP, ev, event_id, pe, parent_pe);
801 if (e->delete_me) break; 801 if (e->delete_me) break;
802 if (obj->pointer_mode == 802 if (obj->pointer_mode ==
803 EVAS_OBJECT_POINTER_MODE_NOGRAB_NO_REPEAT_UPDOWN) 803 EVAS_OBJECT_POINTER_MODE_NOGRAB_NO_REPEAT_UPDOWN)
@@ -808,8 +808,7 @@ _evas_event_source_mouse_up_events(Evas_Object *eo_obj, Evas *eo_e,
808 } 808 }
809 eina_list_free(copy); 809 eina_list_free(copy);
810 810
811 ev->canvas = canvas; 811 efl_del(evt);
812 EV_DEL(pe);
813} 812}
814 813
815static void 814static void
@@ -853,8 +852,11 @@ _evas_event_source_wheel_events(Evas_Object *eo_obj, Evas *eo_e,
853 852
854 evt = efl_event_dup(parent_ev); 853 evt = efl_event_dup(parent_ev);
855 ev = efl_data_scope_get(evt, EFL_EVENT_POINTER_CLASS); 854 ev = efl_data_scope_get(evt, EFL_EVENT_POINTER_CLASS);
855 if (!ev) return;
856
856 _transform_to_src_space_f(obj, src, &ev->cur); 857 _transform_to_src_space_f(obj, src, &ev->cur);
857 point = ev->cur; 858 point = ev->cur;
859 ev->source = eo_obj;
858 860
859 copy = evas_event_list_copy(src->proxy->src_event_in); 861 copy = evas_event_list_copy(src->proxy->src_event_in);
860 EINA_LIST_FOREACH(copy, l, eo_child) 862 EINA_LIST_FOREACH(copy, l, eo_child)
@@ -868,7 +870,8 @@ _evas_event_source_wheel_events(Evas_Object *eo_obj, Evas *eo_e,
868 if (e->delete_me) break; 870 if (e->delete_me) break;
869 } 871 }
870 eina_list_free(copy); 872 eina_list_free(copy);
871 EV_DEL(evt); 873
874 efl_del(evt);
872} 875}
873 876
874static void 877static void
@@ -1349,47 +1352,41 @@ evas_event_thaw_eval(Evas *eo_e)
1349} 1352}
1350 1353
1351static void 1354static void
1352_canvas_event_feed_mouse_down_internal(Eo *eo_e, int b, Evas_Button_Flags flags, 1355_canvas_event_feed_mouse_down_internal(Evas_Public_Data *e, Efl_Event_Pointer_Data *ev)
1353 unsigned int timestamp, const void *data,
1354 Efl_Event_Pointer *parent_pe)
1355{ 1356{
1356 Evas_Public_Data *e = efl_data_scope_get(eo_e, EVAS_CANVAS_CLASS);
1357 Efl_Event_Pointer *pe = NULL;
1358 Eina_List *l, *copy; 1357 Eina_List *l, *copy;
1359 Evas_Event_Mouse_Down ev;
1360 Evas_Object *eo_obj; 1358 Evas_Object *eo_obj;
1359 int event_id, b;
1360 Evas *eo_e;
1361 int addgrab = 0; 1361 int addgrab = 0;
1362 int event_id = 0;
1363 1362
1364 INF("ButtonEvent:down time=%u x=%d y=%d button=%d downs=%d", timestamp, e->pointer.x, e->pointer.y, b, e->pointer.downs); 1363 if (!e || !ev) return;
1364
1365 b = ev->button;
1366 DBG("ButtonEvent:down time=%u x=%d y=%d button=%d downs=%d",
1367 ev->timestamp, e->pointer.x, e->pointer.y, b, e->pointer.downs);
1365 if ((b < 1) || (b > 32)) return; 1368 if ((b < 1) || (b > 32)) return;
1366 1369
1367 e->pointer.button |= (1u << (b - 1)); 1370 e->pointer.button |= (1u << (b - 1));
1368 e->pointer.downs++; 1371 e->pointer.downs++;
1369 1372
1370 if (e->is_frozen) return; 1373 if (e->is_frozen) return;
1371 e->last_timestamp = timestamp; 1374 e->last_timestamp = ev->timestamp;
1375 eo_e = e->evas;
1372 1376
1373 _evas_object_event_new(); 1377 _evas_object_event_new();
1374
1375 event_id = _evas_event_counter; 1378 event_id = _evas_event_counter;
1376 ev.button = b; 1379
1377 ev.output.x = e->pointer.x; 1380 ev->cur.x = e->pointer.x;
1378 ev.output.y = e->pointer.y; 1381 ev->cur.y = e->pointer.y;
1379 ev.canvas.x = e->pointer.x; 1382 ev->modifiers = &(e->modifiers);
1380 ev.canvas.y = e->pointer.y; 1383 ev->locks = &(e->locks);
1381 ev.data = (void *)data; 1384 ev->event_flags = e->default_event_flags;
1382 ev.modifiers = &(e->modifiers); 1385 if (ev->device) efl_ref(ev->device);
1383 ev.locks = &(e->locks);
1384 ev.flags = flags;
1385 ev.timestamp = timestamp;
1386 ev.event_flags = e->default_event_flags;
1387 ev.dev = _evas_device_top_get(eo_e);
1388 if (ev.dev) efl_ref(ev.dev);
1389 1386
1390 _evas_walk(e); 1387 _evas_walk(e);
1391 /* append new touch point to the touch point list */ 1388 /* append new touch point to the touch point list */
1392 _evas_touch_point_append(eo_e, 0, e->pointer.x, e->pointer.y); 1389 _evas_touch_point_append(e->evas, 0, e->pointer.x, e->pointer.y);
1393 /* If this is the first finger down, i.e no other fingers pressed, 1390 /* If this is the first finger down, i.e no other fingers pressed,
1394 * get a new event list, otherwise, keep the current grabbed list. */ 1391 * get a new event list, otherwise, keep the current grabbed list. */
1395 if (e->pointer.mouse_grabbed == 0) 1392 if (e->pointer.mouse_grabbed == 0)
@@ -1426,12 +1423,14 @@ _canvas_event_feed_mouse_down_internal(Eo *eo_e, int b, Evas_Button_Flags flags,
1426 { 1423 {
1427 Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS); 1424 Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS);
1428 if (obj->delete_me) continue; 1425 if (obj->delete_me) continue;
1429 ev.canvas.x = e->pointer.x; 1426 ev->cur.x = e->pointer.x;
1430 ev.canvas.y = e->pointer.y; 1427 ev->cur.y = e->pointer.y;
1431 _evas_event_havemap_adjust(eo_obj, obj, &ev.canvas.x, &ev.canvas.y, obj->mouse_grabbed); 1428 _evas_event_havemap_adjust_f(eo_obj, obj, &ev->cur, obj->mouse_grabbed);
1432 EV_CALL(eo_obj, obj, EVAS_CALLBACK_MOUSE_DOWN, &ev, event_id, pe, parent_pe); 1429 evas_object_event_callback_call
1430 (eo_obj, obj, EVAS_CALLBACK_MOUSE_DOWN, NULL,
1431 event_id, EFL_EVENT_POINTER_DOWN, ev->eo);
1433 if ((obj->proxy->is_proxy) && (obj->proxy->src_events)) 1432 if ((obj->proxy->is_proxy) && (obj->proxy->src_events))
1434 _evas_event_source_mouse_down_events(eo_obj, eo_e, &ev, event_id, pe); 1433 _evas_event_source_mouse_down_events(eo_obj, eo_e, ev->eo, event_id);
1435 if (e->is_frozen || e->delete_me) break; 1434 if (e->is_frozen || e->delete_me) break;
1436 if (obj->pointer_mode == EVAS_OBJECT_POINTER_MODE_NOGRAB_NO_REPEAT_UPDOWN) 1435 if (obj->pointer_mode == EVAS_OBJECT_POINTER_MODE_NOGRAB_NO_REPEAT_UPDOWN)
1437 break; 1436 break;
@@ -1441,44 +1440,32 @@ _canvas_event_feed_mouse_down_internal(Eo *eo_e, int b, Evas_Button_Flags flags,
1441 _evas_post_event_callback_call(eo_e, e); 1440 _evas_post_event_callback_call(eo_e, e);
1442 /* update touch point's state to EVAS_TOUCH_POINT_STILL */ 1441 /* update touch point's state to EVAS_TOUCH_POINT_STILL */
1443 _evas_touch_point_update(eo_e, 0, e->pointer.x, e->pointer.y, EVAS_TOUCH_POINT_STILL); 1442 _evas_touch_point_update(eo_e, 0, e->pointer.x, e->pointer.y, EVAS_TOUCH_POINT_STILL);
1444 if (ev.dev) efl_unref(ev.dev);
1445 _evas_unwalk(e); 1443 _evas_unwalk(e);
1446 EV_DEL(pe);
1447}
1448 1444
1449EAPI void 1445 if (ev->device) efl_unref(ev->device);
1450evas_event_feed_mouse_down(Eo *eo_e, int b, Evas_Button_Flags flags, unsigned int timestamp, const void *data)
1451{
1452 _canvas_event_feed_mouse_down_internal(eo_e, b, flags, timestamp, data, NULL);
1453} 1446}
1454 1447
1455static int 1448static int
1456_post_up_handle(Evas *eo_e, unsigned int timestamp, const void *data, 1449_post_up_handle(Evas_Public_Data *e, Efl_Event_Pointer *parent_ev)
1457 Efl_Event_Pointer *parent_pe)
1458{ 1450{
1459 Evas_Public_Data *e = efl_data_scope_get(eo_e, EVAS_CANVAS_CLASS);
1460 Efl_Event_Pointer *pe = NULL;
1461 Eina_List *l, *copy, *ins, *ll; 1451 Eina_List *l, *copy, *ins, *ll;
1462 Evas_Event_Mouse_Out ev; 1452 Efl_Event_Pointer_Data *ev;
1453 Efl_Event_Pointer *evt;
1463 Evas_Object *eo_obj; 1454 Evas_Object *eo_obj;
1455 Evas *eo_e = e->evas;
1464 int post_called = 0; 1456 int post_called = 0;
1465 int event_id = 0; 1457 int event_id = 0;
1466 1458
1467 _evas_object_event_new(); 1459 _evas_object_event_new();
1468
1469 event_id = _evas_event_counter; 1460 event_id = _evas_event_counter;
1470 ev.buttons = e->pointer.button; 1461
1471 ev.output.x = e->pointer.x; 1462 /* Duplicating UP event */
1472 ev.output.y = e->pointer.y; 1463 evt = efl_event_dup(parent_ev);
1473 ev.canvas.x = e->pointer.x; 1464 ev = efl_data_scope_get(evt, EFL_EVENT_POINTER_CLASS);
1474 ev.canvas.y = e->pointer.y; 1465 if (!ev) return 0;
1475 ev.data = (void *)data; 1466
1476 ev.modifiers = &(e->modifiers); 1467 /* Actually we want an OUT */
1477 ev.locks = &(e->locks); 1468 ev->action = EFL_POINTER_ACTION_OUT;
1478 ev.timestamp = timestamp;
1479 ev.event_flags = e->default_event_flags;
1480 ev.dev = _evas_device_top_get(eo_e);
1481 if (ev.dev) efl_ref(ev.dev);
1482 1469
1483 /* get new list of ins */ 1470 /* get new list of ins */
1484 ins = evas_event_objects_event_list(eo_e, NULL, e->pointer.x, e->pointer.y); 1471 ins = evas_event_objects_event_list(eo_e, NULL, e->pointer.x, e->pointer.y);
@@ -1493,40 +1480,33 @@ _post_up_handle(Evas *eo_e, unsigned int timestamp, const void *data,
1493 obj->mouse_in = 0; 1480 obj->mouse_in = 0;
1494 if (!e->is_frozen) 1481 if (!e->is_frozen)
1495 { 1482 {
1496 ev.canvas.x = e->pointer.x; 1483 ev->cur.x = e->pointer.x;
1497 ev.canvas.y = e->pointer.y; 1484 ev->cur.y = e->pointer.y;
1498 _evas_event_havemap_adjust(eo_obj, obj, &ev.canvas.x, 1485 _evas_event_havemap_adjust_f(eo_obj, obj, &ev->cur, obj->mouse_grabbed);
1499 &ev.canvas.y, obj->mouse_grabbed); 1486 evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_MOUSE_OUT, NULL,
1500 EV_CALL(eo_obj, obj, EVAS_CALLBACK_MOUSE_OUT, &ev, event_id, pe, parent_pe); 1487 event_id, EFL_EVENT_POINTER_OUT, evt);
1501 if ((obj->proxy->is_proxy) && (obj->proxy->src_events)) 1488 if ((obj->proxy->is_proxy) && (obj->proxy->src_events))
1502 _evas_event_source_mouse_out_events(eo_obj, eo_e, &ev, event_id, pe); 1489 {
1490 // FIXME: TEMPORARY
1491 void *ev_out = efl_event_pointer_legacy_info_fill(evt, EVAS_CALLBACK_MOUSE_IN, NULL);
1492 _evas_event_source_mouse_out_events(eo_obj, eo_e, ev_out, event_id, evt);
1493 }
1503 if (e->delete_me) break; 1494 if (e->delete_me) break;
1504 } 1495 }
1505 } 1496 }
1506 } 1497 }
1507 _evas_post_event_callback_call(eo_e, e); 1498 _evas_post_event_callback_call(eo_e, e);
1508 EV_DEL(pe);
1509 1499
1510 eina_list_free(copy); 1500 eina_list_free(copy);
1511 1501
1512 if (e->pointer.inside) 1502 if (e->pointer.inside)
1513 { 1503 {
1514 Evas_Event_Mouse_In ev_in;
1515 Evas_Object *eo_obj_itr; 1504 Evas_Object *eo_obj_itr;
1516 1505
1517 _evas_object_event_new(); 1506 _evas_object_event_new();
1518
1519 event_id = _evas_event_counter; 1507 event_id = _evas_event_counter;
1520 ev_in.buttons = e->pointer.button; 1508
1521 ev_in.output.x = e->pointer.x; 1509 ev->action = EFL_POINTER_ACTION_IN;
1522 ev_in.output.y = e->pointer.y;
1523 ev_in.canvas.x = e->pointer.x;
1524 ev_in.canvas.y = e->pointer.y;
1525 ev_in.data = (void *)data;
1526 ev_in.modifiers = &(e->modifiers);
1527 ev_in.locks = &(e->locks);
1528 ev_in.timestamp = timestamp;
1529 ev_in.event_flags = e->default_event_flags;
1530 1510
1531 EINA_LIST_FOREACH(ins, l, eo_obj_itr) 1511 EINA_LIST_FOREACH(ins, l, eo_obj_itr)
1532 { 1512 {
@@ -1536,15 +1516,18 @@ _post_up_handle(Evas *eo_e, unsigned int timestamp, const void *data,
1536 if (obj_itr->mouse_in) continue; 1516 if (obj_itr->mouse_in) continue;
1537 obj_itr->mouse_in = 1; 1517 obj_itr->mouse_in = 1;
1538 if (e->is_frozen) continue; 1518 if (e->is_frozen) continue;
1539 ev_in.canvas.x = e->pointer.x; 1519 ev->cur.x = e->pointer.x;
1540 ev_in.canvas.y = e->pointer.y; 1520 ev->cur.y = e->pointer.y;
1541 _evas_event_havemap_adjust(eo_obj_itr, obj_itr, 1521 _evas_event_havemap_adjust_f(eo_obj_itr, obj_itr, &ev->cur, obj_itr->mouse_grabbed);
1542 &ev_in.canvas.x, &ev_in.canvas.y, 1522 evas_object_event_callback_call(eo_obj_itr, obj_itr, EVAS_CALLBACK_MOUSE_IN, NULL,
1543 obj_itr->mouse_grabbed); 1523 event_id, EFL_EVENT_POINTER_IN, evt);
1544 EV_CALL(eo_obj_itr, obj_itr, EVAS_CALLBACK_MOUSE_IN, &ev_in, event_id, pe, parent_pe);
1545 if ((obj_itr->proxy->is_proxy) && 1524 if ((obj_itr->proxy->is_proxy) &&
1546 (obj_itr->proxy->src_events)) 1525 (obj_itr->proxy->src_events))
1547 _evas_event_source_mouse_in_events(eo_obj_itr, eo_e, &ev_in, event_id, pe); 1526 {
1527 // FIXME: TEMPORARY
1528 void *ev_in = efl_event_pointer_legacy_info_fill(evt, EVAS_CALLBACK_MOUSE_IN, NULL);
1529 _evas_event_source_mouse_in_events(eo_obj_itr, eo_e, ev_in, event_id, evt);
1530 }
1548 if (e->delete_me) break; 1531 if (e->delete_me) break;
1549 } 1532 }
1550 } 1533 }
@@ -1569,23 +1552,26 @@ _post_up_handle(Evas *eo_e, unsigned int timestamp, const void *data,
1569 eina_list_free(ins); 1552 eina_list_free(ins);
1570 } 1553 }
1571 if (e->pointer.inside) 1554 if (e->pointer.inside)
1572 _canvas_event_feed_mouse_move_internal(eo_e, e, e->pointer.x, e->pointer.y, timestamp, data, pe); 1555 _canvas_event_feed_mouse_move_internal(eo_e, e, e->pointer.x, e->pointer.y, ev->timestamp, ev->data, evt);
1573 if (ev.dev) efl_unref(ev.dev); 1556
1574 EV_DEL(pe); 1557 efl_del(evt);
1575 1558
1576 return post_called; 1559 return post_called;
1577} 1560}
1578 1561
1579static void 1562static void
1580_canvas_event_feed_mouse_up_internal(Eo *eo_e, int b, Evas_Button_Flags flags, 1563_canvas_event_feed_mouse_up_internal(Evas_Public_Data *e, Efl_Event_Pointer_Data *ev)
1581 unsigned int timestamp, const void *data,
1582 Efl_Event_Pointer *parent_pe)
1583{ 1564{
1584 Evas_Public_Data *e = efl_data_scope_get(eo_e, EVAS_CANVAS_CLASS);
1585 Efl_Event_Pointer *pe = NULL;
1586 Eina_List *l, *copy; 1565 Eina_List *l, *copy;
1566 Evas_Object *eo_obj;
1567 int event_id, b;
1568 Evas *eo_e;
1569
1570 if (!e || !ev) return;
1587 1571
1588 INF("ButtonEvent:up time=%u x=%d y=%d button=%d downs=%d", timestamp, e->pointer.x, e->pointer.y, b, e->pointer.downs); 1572 b = ev->button;
1573 DBG("ButtonEvent:up time=%u x=%d y=%d button=%d downs=%d",
1574 ev->timestamp, e->pointer.x, e->pointer.y, b, e->pointer.downs);
1589 if ((b < 1) || (b > 32)) return; 1575 if ((b < 1) || (b > 32)) return;
1590 if (e->pointer.downs <= 0) return; 1576 if (e->pointer.downs <= 0) return;
1591 1577
@@ -1593,76 +1579,60 @@ _canvas_event_feed_mouse_up_internal(Eo *eo_e, int b, Evas_Button_Flags flags,
1593 e->pointer.downs--; 1579 e->pointer.downs--;
1594 1580
1595 if (e->is_frozen) return; 1581 if (e->is_frozen) return;
1596 e->last_timestamp = timestamp; 1582 e->last_timestamp = ev->timestamp;
1597 1583 eo_e = e->evas;
1598 {
1599 Evas_Event_Mouse_Up ev;
1600 Evas_Object *eo_obj;
1601 int event_id = 0;
1602 1584
1603 _evas_object_event_new(); 1585 _evas_object_event_new();
1586 event_id = _evas_event_counter;
1604 1587
1605 event_id = _evas_event_counter; 1588 ev->cur.x = e->pointer.x;
1606 ev.button = b; 1589 ev->cur.y = e->pointer.y;
1607 ev.output.x = e->pointer.x; 1590 ev->modifiers = &(e->modifiers);
1608 ev.output.y = e->pointer.y; 1591 ev->locks = &(e->locks);
1609 ev.canvas.x = e->pointer.x; 1592 ev->event_flags = e->default_event_flags;
1610 ev.canvas.y = e->pointer.y; 1593 if (ev->device) efl_ref(ev->device);
1611 ev.data = (void *)data;
1612 ev.modifiers = &(e->modifiers);
1613 ev.locks = &(e->locks);
1614 ev.flags = flags;
1615 ev.timestamp = timestamp;
1616 ev.event_flags = e->default_event_flags;
1617 ev.dev = _evas_device_top_get(eo_e);
1618 if (ev.dev) efl_ref(ev.dev);
1619 1594
1620 _evas_walk(e); 1595 _evas_walk(e);
1621 /* update released touch point */ 1596 /* update released touch point */
1622 _evas_touch_point_update(eo_e, 0, e->pointer.x, e->pointer.y, EVAS_TOUCH_POINT_UP); 1597 _evas_touch_point_update(eo_e, 0, e->pointer.x, e->pointer.y, EVAS_TOUCH_POINT_UP);
1623 copy = evas_event_list_copy(e->pointer.object.in); 1598 copy = evas_event_list_copy(e->pointer.object.in);
1624 EINA_LIST_FOREACH(copy, l, eo_obj) 1599 EINA_LIST_FOREACH(copy, l, eo_obj)
1600 {
1601 Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS);
1602 if (((obj->pointer_mode == EVAS_OBJECT_POINTER_MODE_AUTOGRAB) ||
1603 (obj->pointer_mode == EVAS_OBJECT_POINTER_MODE_NOGRAB_NO_REPEAT_UPDOWN)) &&
1604 (obj->mouse_grabbed > 0))
1625 { 1605 {
1626 Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS); 1606 obj->mouse_grabbed--;
1627 if (((obj->pointer_mode == EVAS_OBJECT_POINTER_MODE_AUTOGRAB) || 1607 e->pointer.mouse_grabbed--;
1628 (obj->pointer_mode == EVAS_OBJECT_POINTER_MODE_NOGRAB_NO_REPEAT_UPDOWN)) && 1608 }
1629 (obj->mouse_grabbed > 0)) 1609 if (!obj->delete_me)
1630 { 1610 {
1631 obj->mouse_grabbed--; 1611 if ((!e->is_frozen) &&
1632 e->pointer.mouse_grabbed--; 1612 (!evas_event_freezes_through(eo_obj, obj)))
1633 }
1634 if (!obj->delete_me)
1635 {
1636 if ((!e->is_frozen) &&
1637 (!evas_event_freezes_through(eo_obj, obj)))
1638 {
1639 ev.canvas.x = e->pointer.x;
1640 ev.canvas.y = e->pointer.y;
1641 _evas_event_havemap_adjust(eo_obj, obj, &ev.canvas.x,
1642 &ev.canvas.y,
1643 obj->mouse_grabbed);
1644 EV_CALL(eo_obj, obj, EVAS_CALLBACK_MOUSE_UP, &ev, event_id, pe, parent_pe);
1645 if ((obj->proxy->is_proxy) && (obj->proxy->src_events))
1646 _evas_event_source_mouse_up_events(eo_obj, eo_e, &ev, event_id, pe);
1647 if (e->delete_me) break;
1648 }
1649 }
1650 if (obj->pointer_mode == EVAS_OBJECT_POINTER_MODE_NOGRAB_NO_REPEAT_UPDOWN)
1651 { 1613 {
1652 if (e->pointer.nogrep > 0) e->pointer.nogrep--; 1614 ev->cur.x = e->pointer.x;
1653 break; 1615 ev->cur.y = e->pointer.y;
1616 _evas_event_havemap_adjust_f(eo_obj, obj, &ev->cur, obj->mouse_grabbed);
1617 evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_MOUSE_UP, NULL,
1618 event_id, EFL_EVENT_POINTER_UP, ev->eo);
1619 if ((obj->proxy->is_proxy) && (obj->proxy->src_events))
1620 _evas_event_source_mouse_up_events(eo_obj, eo_e, ev->eo, event_id);
1621 if (e->delete_me) break;
1654 } 1622 }
1655 } 1623 }
1656 eina_list_free(copy); 1624 if (obj->pointer_mode == EVAS_OBJECT_POINTER_MODE_NOGRAB_NO_REPEAT_UPDOWN)
1657 e->last_mouse_up_counter++; 1625 {
1658 _evas_post_event_callback_call(eo_e, e); 1626 if (e->pointer.nogrep > 0) e->pointer.nogrep--;
1659 if (ev.dev) efl_unref(ev.dev); 1627 break;
1628 }
1660 } 1629 }
1630 eina_list_free(copy);
1631 e->last_mouse_up_counter++;
1632 _evas_post_event_callback_call(eo_e, e);
1661 1633
1662 if (e->pointer.mouse_grabbed == 0) 1634 if (e->pointer.mouse_grabbed == 0)
1663 { 1635 _post_up_handle(e, ev->eo);
1664 _post_up_handle(eo_e, timestamp, data, parent_pe);
1665 }
1666 1636
1667 if (e->pointer.mouse_grabbed < 0) 1637 if (e->pointer.mouse_grabbed < 0)
1668 { 1638 {
@@ -1671,15 +1641,61 @@ _canvas_event_feed_mouse_up_internal(Eo *eo_e, int b, Evas_Button_Flags flags,
1671 } 1641 }
1672 /* remove released touch point from the touch point list */ 1642 /* remove released touch point from the touch point list */
1673 _evas_touch_point_remove(eo_e, 0); 1643 _evas_touch_point_remove(eo_e, 0);
1674
1675 _evas_unwalk(e); 1644 _evas_unwalk(e);
1676 EV_DEL(pe); 1645
1646 if (ev->device) efl_unref(ev->device);
1647}
1648
1649static void
1650_canvas_event_feed_mouse_updown_legacy(Eo *eo_e, int b, Evas_Button_Flags flags,
1651 unsigned int timestamp, const void *data,
1652 Eina_Bool down)
1653{
1654 Efl_Event_Pointer_Data *ev = NULL;
1655 Efl_Event_Pointer *evt;
1656 Evas_Public_Data *e;
1657
1658 e = efl_data_scope_get(eo_e, EVAS_CANVAS_CLASS);
1659 if (!e) return;
1660
1661 evt = efl_event_instance_get(EFL_EVENT_POINTER_CLASS, eo_e, (void **) &ev);
1662 if (!ev) return;
1663
1664 ev->data = (void *) data;
1665 ev->timestamp = timestamp;
1666 ev->device = _evas_device_top_get(eo_e);
1667 ev->action = down ? EFL_POINTER_ACTION_DOWN : EFL_POINTER_ACTION_UP;
1668 ev->button = b;
1669 ev->button_flags = flags;
1670 ev->device = _evas_device_top_get(e->evas);
1671 ev->radius = 1;
1672 ev->radius_x = 1;
1673 ev->radius_y = 1;
1674 ev->pressure = 1;
1675 ev->angle = 0;
1676 //ev->window_pos = ?;
1677 //ev->fake = 1;
1678
1679 if (down)
1680 _canvas_event_feed_mouse_down_internal(e, ev);
1681 else
1682 _canvas_event_feed_mouse_up_internal(e, ev);
1683
1684 efl_del(evt);
1685}
1686
1687EAPI void
1688evas_event_feed_mouse_down(Eo *eo_e, int b, Evas_Button_Flags flags, unsigned int timestamp, const void *data)
1689{
1690 EINA_SAFETY_ON_FALSE_RETURN(efl_isa(eo_e, EVAS_CANVAS_CLASS));
1691 _canvas_event_feed_mouse_updown_legacy(eo_e, b, flags, timestamp, data, 1);
1677} 1692}
1678 1693
1679EAPI void 1694EAPI void
1680evas_event_feed_mouse_up(Eo *eo_e, int b, Evas_Button_Flags flags, unsigned int timestamp, const void *data) 1695evas_event_feed_mouse_up(Eo *eo_e, int b, Evas_Button_Flags flags, unsigned int timestamp, const void *data)
1681{ 1696{
1682 _canvas_event_feed_mouse_up_internal(eo_e, b, flags, timestamp, data, NULL); 1697 EINA_SAFETY_ON_FALSE_RETURN(efl_isa(eo_e, EVAS_CANVAS_CLASS));
1698 _canvas_event_feed_mouse_updown_legacy(eo_e, b, flags, timestamp, data, 0);
1683} 1699}
1684 1700
1685static void 1701static void
@@ -1702,7 +1718,7 @@ _canvas_event_feed_mouse_cancel_internal(Eo *eo_e, unsigned int timestamp, const
1702 for (i = 0; i < 32; i++) 1718 for (i = 0; i < 32; i++)
1703 { 1719 {
1704 if ((e->pointer.button & (1u << i))) 1720 if ((e->pointer.button & (1u << i)))
1705 _canvas_event_feed_mouse_up_internal(eo_e, i + 1, 0, timestamp, data, parent_pe); 1721 _canvas_event_feed_mouse_updown_legacy(eo_e, i + 1, 0, timestamp, data, 0);
1706 } 1722 }
1707 EINA_LIST_FOREACH_SAFE(e->touch_points, l, ll, point) 1723 EINA_LIST_FOREACH_SAFE(e->touch_points, l, ll, point)
1708 { 1724 {
@@ -2616,7 +2632,7 @@ _canvas_event_feed_multi_up_internal(Evas *eo_e, void *_pd,
2616 if (e->delete_me || e->is_frozen) break; 2632 if (e->delete_me || e->is_frozen) break;
2617 } 2633 }
2618 eina_list_free(copy); 2634 eina_list_free(copy);
2619 if ((e->pointer.mouse_grabbed == 0) && !_post_up_handle(eo_e, timestamp, data, parent_pe)) 2635 if ((e->pointer.mouse_grabbed == 0) && !_post_up_handle(e, parent_pe))
2620 _evas_post_event_callback_call(eo_e, e); 2636 _evas_post_event_callback_call(eo_e, e);
2621 /* remove released touch point from the touch point list */ 2637 /* remove released touch point from the touch point list */
2622 _evas_touch_point_remove(eo_e, d); 2638 _evas_touch_point_remove(eo_e, d);
@@ -3428,6 +3444,7 @@ _evas_canvas_event_pointer_cb(void *data, const Eo_Event *event)
3428 Efl_Event_Pointer_Data *ev = efl_data_scope_get(event->info, EFL_EVENT_POINTER_CLASS); 3444 Efl_Event_Pointer_Data *ev = efl_data_scope_get(event->info, EFL_EVENT_POINTER_CLASS);
3429 Evas_Public_Data *e = data; 3445 Evas_Public_Data *e = data;
3430 Evas *eo_e = event->object; 3446 Evas *eo_e = event->object;
3447 Eina_Bool nodev = 0;
3431 3448
3432 if (!ev) return; 3449 if (!ev) return;
3433 3450
@@ -3435,6 +3452,12 @@ _evas_canvas_event_pointer_cb(void *data, const Eo_Event *event)
3435 ev->modifiers = &e->modifiers; 3452 ev->modifiers = &e->modifiers;
3436 ev->locks = &e->locks; 3453 ev->locks = &e->locks;
3437 3454
3455 if (!ev->device)
3456 {
3457 nodev = 1;
3458 ev->device = _evas_device_top_get(e->evas);
3459 }
3460
3438 switch (ev->action) 3461 switch (ev->action)
3439 { 3462 {
3440 case EFL_POINTER_ACTION_MOVE: 3463 case EFL_POINTER_ACTION_MOVE:
@@ -3455,9 +3478,7 @@ _evas_canvas_event_pointer_cb(void *data, const Eo_Event *event)
3455 3478
3456 case EFL_POINTER_ACTION_DOWN: 3479 case EFL_POINTER_ACTION_DOWN:
3457 if (ev->finger == 0) 3480 if (ev->finger == 0)
3458 { 3481 _canvas_event_feed_mouse_down_internal(e, ev);
3459 _canvas_event_feed_mouse_down_internal(eo_e, ev->button, ev->button_flags, ev->timestamp, ev->data, ev->eo);
3460 }
3461 else 3482 else
3462 { 3483 {
3463 _canvas_event_feed_multi_down_internal(eo_e, e, ev->finger, ev->cur.x, ev->cur.y, 3484 _canvas_event_feed_multi_down_internal(eo_e, e, ev->finger, ev->cur.x, ev->cur.y,
@@ -3470,9 +3491,7 @@ _evas_canvas_event_pointer_cb(void *data, const Eo_Event *event)
3470 3491
3471 case EFL_POINTER_ACTION_UP: 3492 case EFL_POINTER_ACTION_UP:
3472 if (ev->finger == 0) 3493 if (ev->finger == 0)
3473 { 3494 _canvas_event_feed_mouse_up_internal(e, ev);
3474 _canvas_event_feed_mouse_up_internal(eo_e, ev->button, ev->button_flags, ev->timestamp, ev->data, ev->eo);
3475 }
3476 else 3495 else
3477 { 3496 {
3478 _canvas_event_feed_multi_up_internal(eo_e, e, ev->finger, ev->cur.x, ev->cur.y, 3497 _canvas_event_feed_multi_up_internal(eo_e, e, ev->finger, ev->cur.x, ev->cur.y,
@@ -3504,6 +3523,8 @@ _evas_canvas_event_pointer_cb(void *data, const Eo_Event *event)
3504 ev->evas_done = EINA_FALSE; 3523 ev->evas_done = EINA_FALSE;
3505 break; 3524 break;
3506 } 3525 }
3526
3527 if (nodev) ev->device = NULL;
3507} 3528}
3508 3529
3509static void 3530static void