summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2019-06-15 09:38:06 +0100
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2019-06-15 09:38:06 +0100
commit4c6f875c353586ee66c9af0aed48e4866865f846 (patch)
tree5f40427fe906393290983e1ee0dd9064986017f5
parent297fa2bca00e11a6c0ffabaf89a4899e73ccf957 (diff)
evas optimization - fix the "start in list middle" case
i missed 1 rare case where we start in the middle of the list and have to walk to the end. testing didnt show it up. fix. this fixes up that case in b5ed76ba9f22ea659e9e6a3daa32c68354920455
-rw-r--r--src/lib/evas/canvas/evas_events.c29
1 files changed, 17 insertions, 12 deletions
diff --git a/src/lib/evas/canvas/evas_events.c b/src/lib/evas/canvas/evas_events.c
index 19bcf2811c..ee31ef5ac2 100644
--- a/src/lib/evas/canvas/evas_events.c
+++ b/src/lib/evas/canvas/evas_events.c
@@ -369,7 +369,8 @@ _evas_event_object_list_raw_in_get(Evas *eo_e, Eina_List *in,
369 const Eina_Inlist *ilist, 369 const Eina_Inlist *ilist,
370 const Eina_List *list, 370 const Eina_List *list,
371 Evas_Object *stop, 371 Evas_Object *stop,
372 int x, int y, int *no_rep, Eina_Bool source) 372 int x, int y, int *no_rep, Eina_Bool source,
373 Eina_Bool must_walk_last)
373{ 374{
374 Evas_Object_Protected_Data *obj = NULL; 375 Evas_Object_Protected_Data *obj = NULL;
375 DDD_STATIC int spaces = 0; 376 DDD_STATIC int spaces = 0;
@@ -379,7 +380,11 @@ _evas_event_object_list_raw_in_get(Evas *eo_e, Eina_List *in,
379 spaces++; 380 spaces++;
380 if (ilist) 381 if (ilist)
381 { 382 {
382 for (obj = _EINA_INLIST_CONTAINER(obj, ilist->last); 383 Eina_Inlist *last;
384
385 if (must_walk_last) last = eina_inlist_last(ilist);
386 else last = ilist->last;
387 for (obj = _EINA_INLIST_CONTAINER(obj, last);
383 obj; 388 obj;
384 obj = _EINA_INLIST_CONTAINER(obj, EINA_INLIST_GET(obj)->prev)) 389 obj = _EINA_INLIST_CONTAINER(obj, EINA_INLIST_GET(obj)->prev))
385 { 390 {
@@ -500,14 +505,14 @@ _evas_event_source_mouse_down_events(Evas_Object *eo_obj, Evas *eo_e,
500 proxy_write->src_event_in = _evas_event_object_list_raw_in_get 505 proxy_write->src_event_in = _evas_event_object_list_raw_in_get
501 (eo_e, proxy_write->src_event_in, 506 (eo_e, proxy_write->src_event_in,
502 evas_object_smart_members_get_direct(eo_src), NULL, 507 evas_object_smart_members_get_direct(eo_src), NULL,
503 NULL, ev->cur.x, ev->cur.y, &no_rep, EINA_TRUE); 508 NULL, ev->cur.x, ev->cur.y, &no_rep, EINA_TRUE, EINA_FALSE);
504 } 509 }
505 else if (src->is_event_parent) 510 else if (src->is_event_parent)
506 { 511 {
507 proxy_write->src_event_in = _evas_event_object_list_raw_in_get 512 proxy_write->src_event_in = _evas_event_object_list_raw_in_get
508 (eo_e, proxy_write->src_event_in, 513 (eo_e, proxy_write->src_event_in,
509 NULL, evas_object_event_grabber_members_list(eo_src), 514 NULL, evas_object_event_grabber_members_list(eo_src),
510 NULL, ev->cur.x, ev->cur.y, &no_rep, EINA_TRUE); 515 NULL, ev->cur.x, ev->cur.y, &no_rep, EINA_TRUE, EINA_FALSE);
511 } 516 }
512 else 517 else
513 proxy_write->src_event_in = eina_list_append(proxy_write->src_event_in, eo_src); 518 proxy_write->src_event_in = eina_list_append(proxy_write->src_event_in, eo_src);
@@ -699,14 +704,14 @@ _evas_event_source_mouse_move_events(Evas_Object *eo_obj, Evas *eo_e,
699 { 704 {
700 int no_rep = 0; 705 int no_rep = 0;
701 ins = _evas_event_object_list_raw_in_get(eo_e, ins, evas_object_smart_members_get_direct(eo_src), 706 ins = _evas_event_object_list_raw_in_get(eo_e, ins, evas_object_smart_members_get_direct(eo_src),
702 NULL, NULL, ev->cur.x, ev->cur.y, &no_rep, EINA_TRUE); 707 NULL, NULL, ev->cur.x, ev->cur.y, &no_rep, EINA_TRUE, EINA_FALSE);
703 } 708 }
704 else if (src->is_event_parent) 709 else if (src->is_event_parent)
705 { 710 {
706 int no_rep = 0; 711 int no_rep = 0;
707 ins = _evas_event_object_list_raw_in_get(eo_e, ins, NULL, 712 ins = _evas_event_object_list_raw_in_get(eo_e, ins, NULL,
708 evas_object_event_grabber_members_list(eo_src), 713 evas_object_event_grabber_members_list(eo_src),
709 NULL, ev->cur.x, ev->cur.y, &no_rep, EINA_TRUE); 714 NULL, ev->cur.x, ev->cur.y, &no_rep, EINA_TRUE, EINA_FALSE);
710 } 715 }
711 else 716 else
712 ins = eina_list_append(ins, eo_src); 717 ins = eina_list_append(ins, eo_src);
@@ -1147,14 +1152,14 @@ _evas_event_source_multi_move_events(Evas_Object_Protected_Data *obj, Evas_Publi
1147 int no_rep = 0; 1152 int no_rep = 0;
1148 ins = _evas_event_object_list_raw_in_get 1153 ins = _evas_event_object_list_raw_in_get
1149 (eo_e, ins, evas_object_smart_members_get_direct(eo_src), NULL, NULL, 1154 (eo_e, ins, evas_object_smart_members_get_direct(eo_src), NULL, NULL,
1150 ev->cur.x, ev->cur.y, &no_rep, EINA_TRUE); 1155 ev->cur.x, ev->cur.y, &no_rep, EINA_TRUE, EINA_FALSE);
1151 } 1156 }
1152 if (src->is_event_parent) 1157 if (src->is_event_parent)
1153 { 1158 {
1154 int no_rep = 0; 1159 int no_rep = 0;
1155 ins = _evas_event_object_list_raw_in_get 1160 ins = _evas_event_object_list_raw_in_get
1156 (eo_e, ins, NULL, evas_object_event_grabber_members_list(eo_src), NULL, 1161 (eo_e, ins, NULL, evas_object_event_grabber_members_list(eo_src), NULL,
1157 ev->cur.x, ev->cur.y, &no_rep, EINA_TRUE); 1162 ev->cur.x, ev->cur.y, &no_rep, EINA_TRUE, EINA_FALSE);
1158 } 1163 }
1159 else 1164 else
1160 ins = eina_list_append(ins, eo_src); 1165 ins = eina_list_append(ins, eo_src);
@@ -1233,14 +1238,14 @@ _evas_event_source_mouse_in_events(Evas_Object *eo_obj, Evas *eo_e,
1233 { 1238 {
1234 int no_rep = 0; 1239 int no_rep = 0;
1235 ins = _evas_event_object_list_raw_in_get(eo_e, ins, evas_object_smart_members_get_direct(eo_src), 1240 ins = _evas_event_object_list_raw_in_get(eo_e, ins, evas_object_smart_members_get_direct(eo_src),
1236 NULL, NULL, ev->cur.x, ev->cur.y, &no_rep, EINA_TRUE); 1241 NULL, NULL, ev->cur.x, ev->cur.y, &no_rep, EINA_TRUE, EINA_FALSE);
1237 1242
1238 } 1243 }
1239 else if (src->is_event_parent) 1244 else if (src->is_event_parent)
1240 { 1245 {
1241 int no_rep = 0; 1246 int no_rep = 0;
1242 ins = _evas_event_object_list_raw_in_get(eo_e, ins, NULL, evas_object_event_grabber_members_list(eo_src), 1247 ins = _evas_event_object_list_raw_in_get(eo_e, ins, NULL, evas_object_event_grabber_members_list(eo_src),
1243 NULL, ev->cur.x, ev->cur.y, &no_rep, EINA_TRUE); 1248 NULL, ev->cur.x, ev->cur.y, &no_rep, EINA_TRUE, EINA_FALSE);
1244 1249
1245 } 1250 }
1246 else 1251 else
@@ -1358,7 +1363,7 @@ _evas_event_object_list_in_get(Evas *eo_e, Eina_List *in,
1358 int x, int y, int *no_rep, Eina_Bool source) 1363 int x, int y, int *no_rep, Eina_Bool source)
1359{ 1364{
1360 return _evas_event_object_list_raw_in_get(eo_e, in, ilist, list, stop, x, y, 1365 return _evas_event_object_list_raw_in_get(eo_e, in, ilist, list, stop, x, y,
1361 no_rep, source); 1366 no_rep, source, EINA_FALSE);
1362} 1367}
1363 1368
1364static Eina_List * 1369static Eina_List *
@@ -2397,7 +2402,7 @@ nogrep:
2397 ins = _evas_event_object_list_raw_in_get(eo_e, NULL, 2402 ins = _evas_event_object_list_raw_in_get(eo_e, NULL,
2398 EINA_INLIST_GET(below_obj), NULL, NULL, 2403 EINA_INLIST_GET(below_obj), NULL, NULL,
2399 pdata->seat->x, pdata->seat->y, 2404 pdata->seat->x, pdata->seat->y,
2400 &norep, EINA_FALSE); 2405 &norep, EINA_FALSE, EINA_TRUE);
2401 } 2406 }
2402 2407
2403 EINA_LIST_FOREACH(copy, l, eo_obj) 2408 EINA_LIST_FOREACH(copy, l, eo_obj)