forked from enlightenment/efl
elm scroller - fix infinite recursion in scroller adjust
there is an infinite recursion in the scroller adjust code that can happen some times. this fixes T434.
This commit is contained in:
parent
92d41db782
commit
c0e17c12f0
|
@ -840,6 +840,13 @@ _elm_scroll_scroll_bar_size_adjust(Elm_Scrollable_Smart_Interface_Data *sid)
|
|||
{
|
||||
if (!sid->pan_obj || !sid->edje_obj) return;
|
||||
|
||||
if (sid->size_adjust_recurse_abort) return;
|
||||
if (sid->size_adjust_recurse > 20)
|
||||
{
|
||||
sid->size_adjust_recurse_abort = EINA_TRUE;
|
||||
return;
|
||||
}
|
||||
sid->size_adjust_recurse++;
|
||||
if ((sid->content) || (sid->extern_pan))
|
||||
{
|
||||
Evas_Coord x, y, w, h, mx = 0, my = 0, vw = 0, vh = 0, px, py,
|
||||
|
@ -926,6 +933,12 @@ _elm_scroll_scroll_bar_size_adjust(Elm_Scrollable_Smart_Interface_Data *sid)
|
|||
edje_object_signal_emit(sid->edje_obj, "elm,action,scroll", "elm");
|
||||
}
|
||||
_elm_scroll_scroll_bar_visibility_adjust(sid);
|
||||
sid->size_adjust_recurse--;
|
||||
if (sid->size_adjust_recurse <= 0)
|
||||
{
|
||||
sid->size_adjust_recurse = 0;
|
||||
sid->size_adjust_recurse_abort = EINA_FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -1194,6 +1194,9 @@ struct _Elm_Scrollable_Smart_Interface_Data
|
|||
Evas_Coord pagesize_h, pagesize_v;
|
||||
int page_limit_h, page_limit_v;
|
||||
|
||||
unsigned char size_adjust_recurse;
|
||||
Eina_Bool size_adjust_recurse_abort : 1;
|
||||
|
||||
Eina_Bool momentum_animator_disabled : 1;
|
||||
Eina_Bool bounce_animator_disabled : 1;
|
||||
Eina_Bool page_snap_horiz : 1;
|
||||
|
|
Loading…
Reference in New Issue