summaryrefslogtreecommitdiff
path: root/src/lib/evas/gesture
diff options
context:
space:
mode:
authorCedric BAIL <cedric@osg.samsung.com>2018-03-15 12:50:20 -0400
committerCedric Bail <cedric@osg.samsung.com>2018-03-20 17:20:56 -0700
commit4c4177ac207f982de8139c47c7afedd26ff9e15a (patch)
tree1913e890dc525621f4dec3ce281b340d81608a72 /src/lib/evas/gesture
parenta1bf513920e813037756e01cc2e01770befea77c (diff)
efl: use efl_add_ref to create objects which have no parent
Signed-off-by: Mike Blumenkrantz <zmike@osg.samsung.com>
Diffstat (limited to 'src/lib/evas/gesture')
-rw-r--r--src/lib/evas/gesture/efl_canvas_gesture_manager.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/lib/evas/gesture/efl_canvas_gesture_manager.c b/src/lib/evas/gesture/efl_canvas_gesture_manager.c
index af6cc5d..88bcdd0 100644
--- a/src/lib/evas/gesture/efl_canvas_gesture_manager.c
+++ b/src/lib/evas/gesture/efl_canvas_gesture_manager.c
@@ -47,6 +47,12 @@ _cleanup_object(Eina_List *list)
47} 47}
48 48
49static void 49static void
50_hash_unref_cb(Eo *obj)
51{
52 efl_unref(obj);
53}
54
55static void
50_hash_free_cb(Eo *obj) 56_hash_free_cb(Eo *obj)
51{ 57{
52 efl_del(obj); 58 efl_del(obj);
@@ -59,7 +65,7 @@ _efl_canvas_gesture_manager_efl_object_constructor(Eo *obj, Efl_Canvas_Gesture_M
59 65
60 pd->m_recognizers = eina_hash_pointer_new(EINA_FREE_CB(_hash_free_cb)); 66 pd->m_recognizers = eina_hash_pointer_new(EINA_FREE_CB(_hash_free_cb));
61 pd->m_gesture_contex = eina_hash_pointer_new(NULL); 67 pd->m_gesture_contex = eina_hash_pointer_new(NULL);
62 pd->m_object_events = eina_hash_pointer_new(EINA_FREE_CB(_hash_free_cb)); 68 pd->m_object_events = eina_hash_pointer_new(EINA_FREE_CB(_hash_unref_cb));
63 pd->m_object_gestures = NULL; 69 pd->m_object_gestures = NULL;
64 pd->m_gestures_to_delete = NULL; 70 pd->m_gestures_to_delete = NULL;
65 71
@@ -144,7 +150,7 @@ _efl_canvas_gesture_manager_filter_event(Eo *obj, Eo *target, void *event)
144 touch_event = eina_hash_find(pd->m_object_events, &target); 150 touch_event = eina_hash_find(pd->m_object_events, &target);
145 if (!touch_event) 151 if (!touch_event)
146 { 152 {
147 touch_event = efl_add(EFL_CANVAS_GESTURE_TOUCH_CLASS, NULL); 153 touch_event = efl_add_ref(EFL_CANVAS_GESTURE_TOUCH_CLASS, NULL);
148 eina_hash_add(pd->m_object_events, &target, touch_event); 154 eina_hash_add(pd->m_object_events, &target, touch_event);
149 } 155 }
150 156