forked from enlightenment/efl
efl_input_device: Fix seat_get
Summary: This was testing the same thing twice. Reviewers: zmike Reviewed By: zmike Subscribers: cedric, zmike Tags: #efl Differential Revision: https://phab.enlightenment.org/D6180
This commit is contained in:
parent
ebdb3b71a1
commit
7df3299070
|
@ -151,13 +151,17 @@ _efl_input_device_seat_id_get(const Eo *obj, Efl_Input_Device_Data *pd)
|
||||||
EOLIAN static Efl_Input_Device *
|
EOLIAN static Efl_Input_Device *
|
||||||
_efl_input_device_seat_get(const Eo *obj, Efl_Input_Device_Data *pd)
|
_efl_input_device_seat_get(const Eo *obj, Efl_Input_Device_Data *pd)
|
||||||
{
|
{
|
||||||
for (; obj; obj = efl_parent_get(obj))
|
EINA_SAFETY_ON_NULL_RETURN_VAL(obj, NULL);
|
||||||
{
|
|
||||||
if (pd->klass == EFL_INPUT_DEVICE_TYPE_SEAT)
|
|
||||||
return pd->eo;
|
|
||||||
|
|
||||||
|
if (pd->klass == EFL_INPUT_DEVICE_TYPE_SEAT)
|
||||||
|
return pd->eo;
|
||||||
|
|
||||||
|
while ((obj = efl_parent_get(obj)))
|
||||||
|
{
|
||||||
if (!efl_isa(obj, MY_CLASS)) break;
|
if (!efl_isa(obj, MY_CLASS)) break;
|
||||||
pd = efl_data_scope_get(obj, MY_CLASS);
|
pd = efl_data_scope_get(obj, MY_CLASS);
|
||||||
|
if (pd->klass == EFL_INPUT_DEVICE_TYPE_SEAT)
|
||||||
|
return pd->eo;
|
||||||
}
|
}
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
Loading…
Reference in New Issue