diff options
author | Derek Foreman <derekf@osg.samsung.com> | 2018-05-18 13:46:28 -0400 |
---|---|---|
committer | Mike Blumenkrantz <zmike@osg.samsung.com> | 2018-05-18 13:46:28 -0400 |
commit | 7df329907058efc937efc58fb55aaca40dad4f52 (patch) | |
tree | d1aa61770c5589174b613cdec1f9e73d5fd148e1 /src/lib/efl/interfaces/efl_input_device.c | |
parent | ebdb3b71a1379a679c86c03ef37a65e690ffe411 (diff) |
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
Diffstat (limited to '')
-rw-r--r-- | src/lib/efl/interfaces/efl_input_device.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/lib/efl/interfaces/efl_input_device.c b/src/lib/efl/interfaces/efl_input_device.c index aed03c9980..4924f1f9d0 100644 --- a/src/lib/efl/interfaces/efl_input_device.c +++ b/src/lib/efl/interfaces/efl_input_device.c | |||
@@ -151,13 +151,17 @@ _efl_input_device_seat_id_get(const Eo *obj, Efl_Input_Device_Data *pd) | |||
151 | EOLIAN static Efl_Input_Device * | 151 | EOLIAN static Efl_Input_Device * |
152 | _efl_input_device_seat_get(const Eo *obj, Efl_Input_Device_Data *pd) | 152 | _efl_input_device_seat_get(const Eo *obj, Efl_Input_Device_Data *pd) |
153 | { | 153 | { |
154 | for (; obj; obj = efl_parent_get(obj)) | 154 | EINA_SAFETY_ON_NULL_RETURN_VAL(obj, NULL); |
155 | { | 155 | |
156 | if (pd->klass == EFL_INPUT_DEVICE_TYPE_SEAT) | 156 | if (pd->klass == EFL_INPUT_DEVICE_TYPE_SEAT) |
157 | return pd->eo; | 157 | return pd->eo; |
158 | 158 | ||
159 | while ((obj = efl_parent_get(obj))) | ||
160 | { | ||
159 | if (!efl_isa(obj, MY_CLASS)) break; | 161 | if (!efl_isa(obj, MY_CLASS)) break; |
160 | pd = efl_data_scope_get(obj, MY_CLASS); | 162 | pd = efl_data_scope_get(obj, MY_CLASS); |
163 | if (pd->klass == EFL_INPUT_DEVICE_TYPE_SEAT) | ||
164 | return pd->eo; | ||
161 | } | 165 | } |
162 | 166 | ||
163 | return NULL; | 167 | return NULL; |