When a mouse/keyboard is removed from its seat under the Wayland backend,
it was not immediately deleted from EFL, because its parent was keeping
a reference to it. Since the mouse/keyboard is no longer present in the system
there's no reason the keep them around. To prevent this delayed deletion do
not ref/unref them when the parent is set.
{
Efl_Input_Device_Data *child = efl_data_scope_get(eo_child, EFL_INPUT_DEVICE_CLASS);
child->parent = NULL;
- efl_unref(eo_child);
+ }
+ if (pd->parent)
+ {
+ Efl_Input_Device_Data *p = efl_data_scope_get(pd->parent, EFL_INPUT_DEVICE_CLASS);
+ p->children = eina_list_remove(p->children, obj);
}
efl_unref(pd->source);
{
Efl_Input_Device_Data *p = efl_data_scope_get(pd->parent, EFL_INPUT_DEVICE_CLASS);
p->children = eina_list_remove(p->children, obj);
- efl_unref(obj);
}
pd->parent = parent;
if (parent)
{
Efl_Input_Device_Data *p = efl_data_scope_get(parent, EFL_INPUT_DEVICE_CLASS);
p->children = eina_list_append(p->children, obj);
- efl_ref(obj);
}
}