forked from enlightenment/efl
Ctxpopup super slow with some more items
If you put some (like 100) items in a ctxpopup it will take 5 seconds to show up and throw all kind of errors on console. This is an example that show the issue, I opened T7176 to track this issue
This commit is contained in:
parent
44bce025fa
commit
0a4ea24207
|
@ -469,6 +469,31 @@ _list_item_cb10(void *data EINA_UNUSED, Evas_Object *obj, void *event_info EINA_
|
|||
_print_current_dir(ctxpopup);
|
||||
}
|
||||
|
||||
static void
|
||||
_list_item_cb11(void *data EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED)
|
||||
{
|
||||
Evas_Object *ctxpopup;
|
||||
Evas_Coord x,y;
|
||||
char label[16];
|
||||
int i = 0;
|
||||
|
||||
if (list_mouse_down > 0) return;
|
||||
|
||||
ctxpopup = elm_ctxpopup_add(obj);
|
||||
evas_object_smart_callback_add(ctxpopup, "dismissed", _dismissed, NULL);
|
||||
evas_object_smart_callback_add(ctxpopup, "geometry,update", _geometry_update, NULL);
|
||||
|
||||
while (i++ < 100)
|
||||
{
|
||||
snprintf(label, sizeof(label), "Item %d", i);
|
||||
_ctxpopup_item_new(ctxpopup, label, "clock");
|
||||
}
|
||||
|
||||
evas_pointer_canvas_xy_get(evas_object_evas_get(obj), &x, &y);
|
||||
evas_object_move(ctxpopup, x, y);
|
||||
evas_object_show(ctxpopup);
|
||||
}
|
||||
|
||||
static void
|
||||
_list_clicked(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info)
|
||||
{
|
||||
|
@ -532,6 +557,8 @@ test_ctxpopup(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_
|
|||
_list_item_cb9, NULL);
|
||||
elm_list_item_append(list, "Ctxpopup with user content (enable to remove)", NULL, NULL,
|
||||
_list_item_cb10, NULL);
|
||||
elm_list_item_append(list, "Ctxpopup with more items", NULL, NULL,
|
||||
_list_item_cb11, NULL);
|
||||
evas_object_show(list);
|
||||
elm_list_go(list);
|
||||
|
||||
|
|
Loading…
Reference in New Issue