The compare function(_sort_by_repeat_events) does not change if two objects
repeat event(repeat_events: 1) even though the second object is registered to
elm_access. In this case the object could be demoted in the list, and it is not
possilbe to find the object by screen reader.
The following is the problem case:
[Before Sorting]
1. Object A (repeat_events: 1)
2. Object B (repeat_events: 1, is registred to elm_access)
3. Object C (repeat_events: 1)
4. Object D (repeat_events: 0)
5. Object E (repeat_events: 0)
[After Sorting] D - E - A - B -C
Change-Id: I5c566252507d8d6c5aac5759588cdd9e1468cd3e
static int _sort_by_repeat_events(const void *data1, const void *data2)
{
+ Evas_Object *ao1, *ao2;
Eina_Bool repeat1, repeat2;
+ ao1 = elm_access_object_get(data1);
+ ao2 = elm_access_object_get(data2);
+
repeat1 = evas_object_repeat_events_get(data1);
repeat2 = evas_object_repeat_events_get(data2);
- Evas_Object *ao = elm_access_object_get(data1);
- if (ao) return -1;
+ if (repeat1 != repeat2)
+ {
+ if (repeat1 && !ao1) return 1;
+ }
+ else
+ {
+ if (repeat1 && !ao1 && ao2) return 1;
+ }
- if (repeat1 != repeat2 && repeat1 == EINA_TRUE) return 1;
return -1;
}