evas: Fix use of invalid EO object

During a window destruction, the input devices are deleted and
removed from the internal devices list. Since 83d18617b4
basic devices are children of a seat, which means that the seat
deletion was triggering the devices deletion as well. As a
consequence, we were walking an invalid list of devices.

I'm not sure we should have a list of children in the device
data and I'm also not sure we should have a list of devices in
evas, instead of just the list of seats. It's a bit messy right
now.

Ref T5540
This commit is contained in:
Jean-Philippe Andre 2017-06-12 17:39:34 +09:00
parent e5922c0720
commit 9b1e785f8e
1 changed files with 2 additions and 0 deletions

View File

@ -207,6 +207,8 @@ evas_device_add_full(Evas *eo_e, const char *name, const char *desc,
e->default_mouse = dev;
}
// FIXME: All devices are in the same list, while evas only refs the seats
if (parent_dev) efl_ref(dev);
e->devices = eina_list_append(e->devices, dev);
efl_event_callback_add(dev, EFL_EVENT_DEL, _del_cb, e);