summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lib/evas/canvas/evas_object_main.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/src/lib/evas/canvas/evas_object_main.c b/src/lib/evas/canvas/evas_object_main.c
index a030505ffe..a705bd42b7 100644
--- a/src/lib/evas/canvas/evas_object_main.c
+++ b/src/lib/evas/canvas/evas_object_main.c
@@ -942,14 +942,28 @@ _efl_canvas_object_efl_input_interface_seat_event_filter_set(Eo *eo_obj,
942 if (add) 942 if (add)
943 { 943 {
944 if (eina_list_data_find(obj->events_whitelist, seat)) return; 944 if (eina_list_data_find(obj->events_whitelist, seat)) return;
945 if (efl_canvas_object_seat_focus_check(eo_obj, seat)) 945 /* remove all previously focused seats, if any - it may happen
946 efl_canvas_object_seat_focus_del(eo_obj, seat); 946 since there wasn't a whitelist in place (no restrictions) */
947 if ((!obj->events_whitelist) && (obj->layer) && (obj->layer->evas))
948 {
949 const Eina_List *devices, *l;
950 Efl_Input_Device *dev;
951
952 devices = obj->layer->evas->devices;
953 EINA_LIST_FOREACH(devices, l, dev)
954 {
955 if ((efl_input_device_type_get(dev) ==
956 EFL_INPUT_DEVICE_CLASS_SEAT) && (dev != seat))
957 efl_canvas_object_seat_focus_del(eo_obj, dev);
958 }
959 }
947 obj->events_whitelist = eina_list_append(obj->events_whitelist, seat); 960 obj->events_whitelist = eina_list_append(obj->events_whitelist, seat);
948 efl_event_callback_add(seat, EFL_EVENT_DEL, 961 efl_event_callback_add(seat, EFL_EVENT_DEL,
949 _whitelist_events_device_remove_cb, obj); 962 _whitelist_events_device_remove_cb, obj);
950 } 963 }
951 else 964 else
952 { 965 {
966 efl_canvas_object_seat_focus_del(eo_obj, seat);
953 obj->events_whitelist = eina_list_remove(obj->events_whitelist, seat); 967 obj->events_whitelist = eina_list_remove(obj->events_whitelist, seat);
954 efl_event_callback_del(seat, EFL_EVENT_DEL, 968 efl_event_callback_del(seat, EFL_EVENT_DEL,
955 _whitelist_events_device_remove_cb, obj); 969 _whitelist_events_device_remove_cb, obj);