From dad6644c70bfe6274d552e7cf1989c36dc7257f1 Mon Sep 17 00:00:00 2001 From: Jean Guyomarc'h Date: Tue, 13 Oct 2015 17:12:53 +0200 Subject: [PATCH] ecore_evas_cocoa: focus: handle ignore_events Change-Id: I953a13849960a785ab71e2c106fd1cfb35b98b27 Signed-off-by: Cedric BAIL --- .../ecore_evas/engines/cocoa/ecore_evas_cocoa.c | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) diff --git a/src/modules/ecore_evas/engines/cocoa/ecore_evas_cocoa.c b/src/modules/ecore_evas/engines/cocoa/ecore_evas_cocoa.c index 0424742..d735805 100644 --- a/src/modules/ecore_evas/engines/cocoa/ecore_evas_cocoa.c +++ b/src/modules/ecore_evas/engines/cocoa/ecore_evas_cocoa.c @@ -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); -- 2.7.4