aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/evas/canvas/evas_focus.c
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2017-06-09 20:16:07 -0400
committerMike Blumenkrantz <zmike@osg.samsung.com>2017-06-09 19:14:59 -0400
commit839e45e49b4a574d904ee2022692956a304fd7a7 (patch)
tree8eb18968d7011d4eaca17d8ea9fb48a2093ee0e8 /src/lib/evas/canvas/evas_focus.c
parentecore-ipc: don't return dead clients in ecore_ipc_server_clients_get (diff)
downloadefl-839e45e49b4a574d904ee2022692956a304fd7a7.tar.gz
evas: handle focus setting with async input init
@fix
Diffstat (limited to 'src/lib/evas/canvas/evas_focus.c')
-rw-r--r--src/lib/evas/canvas/evas_focus.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/lib/evas/canvas/evas_focus.c b/src/lib/evas/canvas/evas_focus.c
index 293fb57b6c..30afdaa08e 100644
--- a/src/lib/evas/canvas/evas_focus.c
+++ b/src/lib/evas/canvas/evas_focus.c
@@ -132,6 +132,12 @@ _efl_canvas_object_seat_focus_del(Eo *eo_obj,
if (!seat) seat = _default_seat_get(eo_obj);
+ if ((!seat) && obj->layer)
+ {
+ if (obj->layer->evas->pending_default_focus_obj == eo_obj)
+ obj->layer->evas->pending_default_focus_obj = NULL;
+ }
+
EINA_LIST_FOREACH(obj->focused_by_seats, l, dev)
{
if (dev != seat)
@@ -166,10 +172,15 @@ _efl_canvas_object_seat_focus_add(Eo *eo_obj,
event_id = _evas_event_counter;
if (!seat) seat = _default_seat_get(eo_obj);
- EINA_SAFETY_ON_NULL_RETURN_VAL(seat, EINA_FALSE);
- if (efl_input_device_type_get(seat) != EFL_INPUT_DEVICE_CLASS_SEAT)
+ if (seat && (efl_input_device_type_get(seat) != EFL_INPUT_DEVICE_CLASS_SEAT))
return EINA_FALSE;
+ if (obj->layer && (!seat))
+ {
+ obj->layer->evas->pending_default_focus_obj = eo_obj;
+ return EINA_TRUE; //questionable return
+ }
+
if (!efl_input_seat_event_filter_get(eo_obj, seat))
return EINA_FALSE;