summaryrefslogtreecommitdiff
path: root/src/lib/evas/canvas/evas_device.c
diff options
context:
space:
mode:
authorCedric Bail <cedric@osg.samsung.com>2018-04-06 14:53:44 -0700
committerCedric BAIL <cedric@osg.samsung.com>2018-05-01 10:39:01 -0700
commit0e5aa8dccd7f55053a10b673f2174c4e5a26024f (patch)
tree32c2ac4aec33e47ba75662ae35eef4cb4f5c9b86 /src/lib/evas/canvas/evas_device.c
parent356e37564abb18775c5b9cb5a0d52dd0aba6290f (diff)
evas: do not link the life cycle of the device with the parent.
Diffstat (limited to '')
-rw-r--r--src/lib/evas/canvas/evas_device.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/lib/evas/canvas/evas_device.c b/src/lib/evas/canvas/evas_device.c
index e67350deeb..a871116aee 100644
--- a/src/lib/evas/canvas/evas_device.c
+++ b/src/lib/evas/canvas/evas_device.c
@@ -184,11 +184,11 @@ evas_device_add_full(Evas *eo_e, const char *name, const char *desc,
184 184
185 SAFETY_CHECK(eo_e, EVAS_CANVAS_CLASS, NULL); 185 SAFETY_CHECK(eo_e, EVAS_CANVAS_CLASS, NULL);
186 186
187 dev = efl_add(EFL_INPUT_DEVICE_CLASS, parent_dev ?: eo_e, 187 dev = efl_add_ref(EFL_INPUT_DEVICE_CLASS, parent_dev ?: eo_e,
188 efl_name_set(efl_added, name), 188 efl_name_set(efl_added, name),
189 efl_comment_set(efl_added, desc), 189 efl_comment_set(efl_added, desc),
190 efl_input_device_type_set(efl_added, clas), 190 efl_input_device_type_set(efl_added, clas),
191 efl_input_device_source_set(efl_added, emulation_dev)); 191 efl_input_device_source_set(efl_added, emulation_dev));
192 192
193 d = efl_data_scope_get(dev, EFL_INPUT_DEVICE_CLASS); 193 d = efl_data_scope_get(dev, EFL_INPUT_DEVICE_CLASS);
194 d->evas = eo_e; 194 d->evas = eo_e;
@@ -264,8 +264,9 @@ EAPI void
264evas_device_del(Evas_Device *dev) 264evas_device_del(Evas_Device *dev)
265{ 265{
266 SAFETY_CHECK(dev, EFL_INPUT_DEVICE_CLASS); 266 SAFETY_CHECK(dev, EFL_INPUT_DEVICE_CLASS);
267 267 if (!efl_invalidated_get(dev))
268 efl_del(dev); 268 efl_del(dev);
269 efl_unref(dev);
269} 270}
270 271
271EAPI void 272EAPI void