aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/evas/canvas/evas_focus.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/evas/canvas/evas_focus.c')
-rw-r--r--src/lib/evas/canvas/evas_focus.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/lib/evas/canvas/evas_focus.c b/src/lib/evas/canvas/evas_focus.c
index 0b79bf958c..6ea934a8cd 100644
--- a/src/lib/evas/canvas/evas_focus.c
+++ b/src/lib/evas/canvas/evas_focus.c
@@ -106,7 +106,10 @@ _evas_object_unfocus(Evas_Object_Protected_Data *obj, Efl_Input_Device *seat)
{
int event_id = _evas_event_counter;
- obj->focused_by_seats = eina_list_remove(obj->focused_by_seats, seat);
+ EINA_COW_WRITE_BEGIN(evas_object_events_cow, obj->events, Evas_Object_Events_Data, events)
+ events->focused_by_seats = eina_list_remove(events->focused_by_seats, seat);
+ EINA_COW_WRITE_END(evas_object_events_cow, obj->events, events);
+
_evas_focus_set(obj->object, seat, EINA_FALSE);
_evas_focus_dispatch_event(obj, seat, EINA_FALSE);
_evas_post_event_callback_call(obj->layer->evas->evas, obj->layer->evas, event_id);
@@ -138,7 +141,7 @@ _efl_canvas_object_seat_focus_del(Eo *eo_obj,
obj->layer->evas->pending_default_focus_obj = NULL;
}
- EINA_LIST_FOREACH(obj->focused_by_seats, l, dev)
+ EINA_LIST_FOREACH(obj->events->focused_by_seats, l, dev)
{
if (dev != seat)
continue;
@@ -184,7 +187,7 @@ _efl_canvas_object_seat_focus_add(Eo *eo_obj,
if (!efl_input_seat_event_filter_get(eo_obj, seat))
return EINA_FALSE;
- if (_already_focused(obj->focused_by_seats, seat))
+ if (_already_focused(obj->events->focused_by_seats, seat))
goto end;
if (_evas_object_intercept_call_evas(obj, EVAS_OBJECT_INTERCEPT_CB_FOCUS_SET,
@@ -202,7 +205,10 @@ _efl_canvas_object_seat_focus_add(Eo *eo_obj,
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);
+ EINA_COW_WRITE_BEGIN(evas_object_events_cow, obj->events, Evas_Object_Events_Data, events)
+ events->focused_by_seats = eina_list_append(events->focused_by_seats, seat);
+ EINA_COW_WRITE_END(evas_object_events_cow, obj->events, events);
+
_evas_focus_set(eo_obj, seat, EINA_TRUE);
_evas_focus_dispatch_event(obj, seat, EINA_TRUE);
@@ -225,7 +231,7 @@ _efl_canvas_object_seat_focus_check(Eo *eo_obj,
if (!seat) seat = _default_seat_get(eo_obj);
- EINA_LIST_FOREACH(obj->focused_by_seats, l, s)
+ EINA_LIST_FOREACH(obj->events->focused_by_seats, l, s)
{
if (s == seat)
return EINA_TRUE;
@@ -253,7 +259,7 @@ _efl_canvas_object_seat_focus_get(Eo *eo_obj, Evas_Object_Protected_Data *obj)
return EINA_FALSE;
MAGIC_CHECK_END();
- return eina_list_count(obj->focused_by_seats) ? EINA_TRUE : EINA_FALSE;
+ return eina_list_count(obj->events->focused_by_seats) ? EINA_TRUE : EINA_FALSE;
}
EOLIAN Eina_Bool