forked from enlightenment/efl
evas focus: Do not allow two objects focused by the same seat.
Summary: Before focusing an object, the intercept focus callback is called. This callback may ask Evas to focus another object instead, so it's necessary to check if the seat in question still have a focused object event after a efl_canvas_object_seat_focus_del() call. Reviewers: cedric, bdilly, barbieri, ProhtMeyhet, netstar Subscribers: cedric, jpeg Maniphest Tasks: T4864, T4886 Differential Revision: https://phab.enlightenment.org/D4396 Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
This commit is contained in:
parent
ee5a1d28f1
commit
883d41f006
|
@ -153,6 +153,9 @@ _efl_canvas_object_seat_focus_add(Eo *eo_obj,
|
|||
if (current_focus)
|
||||
efl_canvas_object_seat_focus_del(current_focus, seat);
|
||||
|
||||
//In case intercept focus callback focused object we should return.
|
||||
if (_current_focus_get(eo_obj, seat)) goto end;
|
||||
|
||||
efl_event_callback_add(seat, EFL_EVENT_DEL, _evas_focus_device_del_cb, obj);
|
||||
|
||||
obj->focused_by_seats = eina_list_append(obj->focused_by_seats, seat);
|
||||
|
|
Loading…
Reference in New Issue