elm_genlist: item scroll show sould be processed after block calculation
authorSangHyeon Jade Lee <sh10233.lee@samsung.com>
Thu, 30 Aug 2018 11:21:09 +0000 (20:21 +0900)
committersubhransu mohanty <sub.mohanty@samsung.com>
Mon, 10 Sep 2018 03:54:37 +0000 (12:54 +0900)
This patch is port of upstream patch 6dd149d8fef662a8c938b8335fc311caeef89911

Summary:
there are buggy actions in the item show api,
when the list is launched, scroll to far distance item.
the reason is item_scroll is called before it's block is fully
calculated in calc_job().
the origin patch of cause the issue is
f6b66cc1d3b94bedc25cb10bd5317855954af973
by raster in 28 Nov, 2013
but we already do some extra works in calc_job(),
so the code is not necessarily called in queue_process().

more detail descriptions :
mainly this caused by block width size,
so the normal case block width is zero, and item_scroll() will be dismissed,
and deferred action in calc_job(), but in issue case,
block width is already been set, so it can scroll the item directly though
they aren't properly calculated yet.

most cases block was generated in the same queue processing so width size is
not exist, but in issue cases, they re-using the block which was already been
generated by previous queue processing, so the width size is already exist,
but height is not properly calculated yet.

we could move the block height calculation and min/max calculation
in the queue processing, but I'm afraid to face side effect,
so removing item_scroll() call is best option that I got.

Change-Id: Ib3bfcde0eec23c9e7a8363876d7c2ec0f39fccc0

src/lib/elementary/elm_genlist.c

index 8849a47..c045205 100644 (file)
@@ -5078,7 +5078,6 @@ _queue_process(Elm_Genlist_Data *sd)
              if ((t - t0) > (ecore_animator_frametime_get())) break;
           }
      }
-   if (!sd->queue) _item_scroll(sd);
    return n;
 }