aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/elementary/elm_widget.c
diff options
context:
space:
mode:
authorSungtaek Hong <sth253.hong@samsung.com>2017-11-24 14:32:36 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2017-11-24 14:32:36 +0900
commit8f2369c5b6b756619f23cc96f312e4e97030ab7c (patch)
treefee7dce27d655ec35c6776473b6f789a752eb382 /src/lib/elementary/elm_widget.c
parentevas: remove warning from image_loaders/png/evas_image_load_png (diff)
downloadefl-8f2369c5b6b756619f23cc96f312e4e97030ab7c.tar.gz
efl_ui_widget: secure elm_legacy_add flag
Summary: _elm_legacy_add goes back to EINA_FALSE after setting sd->legacy. if constructor get called again after going back to EINA_FALSE, sd->legacy should remain EINA_TRUE. also, elm_legacy_add() should not be called non-elm_widget. Test Plan: Run elementary test->Efl.Ui.Text.Label. Check legacy flag in _elm_theme_object_set() for efl_ui_win. Check legacy flag for efl_ui_text after scrollable text is added. Reviewers: jpeg, woohyun Reviewed By: jpeg Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D5529
Diffstat (limited to 'src/lib/elementary/elm_widget.c')
-rw-r--r--src/lib/elementary/elm_widget.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/lib/elementary/elm_widget.c b/src/lib/elementary/elm_widget.c
index 3b122a9b84..5531bb7a87 100644
--- a/src/lib/elementary/elm_widget.c
+++ b/src/lib/elementary/elm_widget.c
@@ -5046,8 +5046,11 @@ _elm_widget_efl_object_constructor(Eo *obj, Elm_Widget_Smart_Data *sd EINA_UNUSE
Eo *parent = NULL;
sd->on_create = EINA_TRUE;
- sd->legacy = _elm_legacy_add;
- _elm_legacy_add = EINA_FALSE;
+ if (_elm_legacy_add)
+ {
+ sd->legacy = _elm_legacy_add;
+ _elm_legacy_add = EINA_FALSE;
+ }
efl_canvas_group_clipped_set(obj, EINA_FALSE);
obj = efl_constructor(efl_super(obj, MY_CLASS));
efl_canvas_object_type_set(obj, MY_CLASS_NAME_LEGACY);