summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Hirt <hirt.danny@gmail.com>2017-06-08 08:50:14 +0300
committerDaniel Hirt <hirt.danny@gmail.com>2017-06-08 08:50:14 +0300
commiteacf1d1163e878e58a4cffb73ae17edec9f10b25 (patch)
treee8ab52ef29357c74ab9bffc954acfd3e858d2eca
parent89dded496a60dc745762c10f369d18d848e64f57 (diff)
downloadefl-devs/herdsman/efl_canvas_text_cursor_to_old.tar.gz
Ui text: fix leak of selection on destructiondevs/herdsman/efl_canvas_text_cursor_to_old
-rw-r--r--src/lib/elementary/efl_ui_text.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/lib/elementary/efl_ui_text.c b/src/lib/elementary/efl_ui_text.c
index 49319f12e3..235f6f99e7 100644
--- a/src/lib/elementary/efl_ui_text.c
+++ b/src/lib/elementary/efl_ui_text.c
@@ -270,6 +270,7 @@ static inline Eo * _decoration_create(Efl_Ui_Text_Data *sd, const char *file, co
static void _decoration_defer(Eo *obj);
static void _anchors_clear_all(Evas_Object *o EINA_UNUSED, Efl_Ui_Text_Data *sd);
static void _unused_item_objs_free(Efl_Ui_Text_Data *sd);
+static void _clear_text_selection(Efl_Ui_Text_Data *sd);
static Mod_Api *
_module_find(Evas_Object *obj EINA_UNUSED)
@@ -3257,6 +3258,7 @@ _efl_ui_text_efl_canvas_group_group_del(Eo *obj, Efl_Ui_Text_Data *sd)
_anchors_clear_all(obj, sd);
_unused_item_objs_free(sd);
+ _clear_text_selection(sd);
text_obj = edje_object_part_swallow_get(sd->entry_edje, "elm.text");
efl_event_callback_del(text_obj, EFL_UI_TEXT_INTERACTIVE_EVENT_CHANGED_USER,
@@ -4732,6 +4734,18 @@ _update_text_cursors(Eo *obj)
}
static void
+_clear_text_selection(Efl_Ui_Text_Data *sd)
+{
+ Efl_Ui_Text_Rectangle *r;
+
+ EINA_LIST_FREE(sd->sel, r)
+ {
+ free(r);
+ }
+
+}
+
+static void
_update_text_selection(Eo *obj, Eo *text_obj)
{
Evas_Coord x, y;