ecore_evas_cocoa: focus: handle ignore_events

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
This commit is contained in:
Jean Guyomarc'h 2015-10-13 17:12:53 +02:00 committed by Cedric BAIL
parent 25a44cc9d8
commit e8fe721cd5
1 changed files with 2 additions and 20 deletions

View File

@ -183,18 +183,9 @@ _ecore_evas_cocoa_event_got_focus(void *data EINA_UNUSED, int type EINA_UNUSED,
Ecore_Cocoa_Event_Window *e = event;
Ecore_Evas *ee;
DBG("");
if (!e->wid)
return ECORE_CALLBACK_PASS_ON;
ee = _ecore_evas_cocoa_match(e->wid);
if ((!ee) || (ee->ignore_events)) return ECORE_CALLBACK_PASS_ON;
if (!ee)
{
ERR("Unregistered Ecore_Evas for window Id %p", e->wid);
return ECORE_CALLBACK_PASS_ON;
}
ee->prop.focused = EINA_TRUE;
evas_focus_in(ee->evas);
if (ee->func.fn_focus_in) ee->func.fn_focus_in(ee);
@ -208,18 +199,9 @@ _ecore_evas_cocoa_event_lost_focus(void *data EINA_UNUSED, int type EINA_UNUSED,
Ecore_Cocoa_Event_Window *e = event;
Ecore_Evas *ee;
DBG("");
if (!e->wid)
return ECORE_CALLBACK_PASS_ON;
ee = _ecore_evas_cocoa_match(e->wid);
if ((!ee) || (ee->ignore_events)) return ECORE_CALLBACK_PASS_ON;
if (!ee)
{
ERR("Unregistered Ecore_Evas for window Id %p", e->wid);
return ECORE_CALLBACK_PASS_ON;
}
evas_focus_out(ee->evas);
ee->prop.focused = EINA_FALSE;
if (ee->func.fn_focus_out) ee->func.fn_focus_out(ee);