summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2013-11-26 19:32:35 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2013-11-26 19:34:36 +0900
commit8af76b608996b62e5cdfb5f4383606646b029a54 (patch)
treed36b6af252d90a5e8f622d763bcd436edcb81077 /src
parente207de877f3db020323a5c8a7d46b66cc89bb1e4 (diff)
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.
Diffstat (limited to 'src')
-rw-r--r--src/lib/elm_interface_scrollable.c13
-rw-r--r--src/lib/elm_interface_scrollable.h3
2 files changed, 16 insertions, 0 deletions
diff --git a/src/lib/elm_interface_scrollable.c b/src/lib/elm_interface_scrollable.c
index e677b8915..625255643 100644
--- a/src/lib/elm_interface_scrollable.c
+++ b/src/lib/elm_interface_scrollable.c
@@ -840,6 +840,13 @@ _elm_scroll_scroll_bar_size_adjust(Elm_Scrollable_Smart_Interface_Data *sid)
840{ 840{
841 if (!sid->pan_obj || !sid->edje_obj) return; 841 if (!sid->pan_obj || !sid->edje_obj) return;
842 842
843 if (sid->size_adjust_recurse_abort) return;
844 if (sid->size_adjust_recurse > 20)
845 {
846 sid->size_adjust_recurse_abort = EINA_TRUE;
847 return;
848 }
849 sid->size_adjust_recurse++;
843 if ((sid->content) || (sid->extern_pan)) 850 if ((sid->content) || (sid->extern_pan))
844 { 851 {
845 Evas_Coord x, y, w, h, mx = 0, my = 0, vw = 0, vh = 0, px, py, 852 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)
926 edje_object_signal_emit(sid->edje_obj, "elm,action,scroll", "elm"); 933 edje_object_signal_emit(sid->edje_obj, "elm,action,scroll", "elm");
927 } 934 }
928 _elm_scroll_scroll_bar_visibility_adjust(sid); 935 _elm_scroll_scroll_bar_visibility_adjust(sid);
936 sid->size_adjust_recurse--;
937 if (sid->size_adjust_recurse <= 0)
938 {
939 sid->size_adjust_recurse = 0;
940 sid->size_adjust_recurse_abort = EINA_FALSE;
941 }
929} 942}
930 943
931static void 944static void
diff --git a/src/lib/elm_interface_scrollable.h b/src/lib/elm_interface_scrollable.h
index da1b21a80..b36deb268 100644
--- a/src/lib/elm_interface_scrollable.h
+++ b/src/lib/elm_interface_scrollable.h
@@ -1194,6 +1194,9 @@ struct _Elm_Scrollable_Smart_Interface_Data
1194 Evas_Coord pagesize_h, pagesize_v; 1194 Evas_Coord pagesize_h, pagesize_v;
1195 int page_limit_h, page_limit_v; 1195 int page_limit_h, page_limit_v;
1196 1196
1197 unsigned char size_adjust_recurse;
1198 Eina_Bool size_adjust_recurse_abort : 1;
1199
1197 Eina_Bool momentum_animator_disabled : 1; 1200 Eina_Bool momentum_animator_disabled : 1;
1198 Eina_Bool bounce_animator_disabled : 1; 1201 Eina_Bool bounce_animator_disabled : 1;
1199 Eina_Bool page_snap_horiz : 1; 1202 Eina_Bool page_snap_horiz : 1;