summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean Guyomarc'h <jean.guyomarch@openwide.fr>2015-10-13 17:12:53 +0200
committerNicolas Aguirre <aguirre.nicolas@gmail.com>2015-11-10 08:32:49 +0100
commita439f71965db5eb8af558086d8f38a430709c94f (patch)
treee446accb4a7f632457afe46a1441359feddf515e
parentf1679e259a2497a3b6ef7ae04ff51688061b3f98 (diff)
ecore_evas_cocoa: focus: handle ignore_events
-rw-r--r--src/modules/ecore_evas/engines/cocoa/ecore_evas_cocoa.c22
1 files 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 ff9712d126..4e6cecfb15 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,
183 Ecore_Cocoa_Event_Window *e = event; 183 Ecore_Cocoa_Event_Window *e = event;
184 Ecore_Evas *ee; 184 Ecore_Evas *ee;
185 185
186 DBG("");
187
188 if (!e->wid)
189 return ECORE_CALLBACK_PASS_ON;
190
191 ee = _ecore_evas_cocoa_match(e->wid); 186 ee = _ecore_evas_cocoa_match(e->wid);
187 if ((!ee) || (ee->ignore_events)) return ECORE_CALLBACK_PASS_ON;
192 188
193 if (!ee)
194 {
195 ERR("Unregistered Ecore_Evas for window Id %p", e->wid);
196 return ECORE_CALLBACK_PASS_ON;
197 }
198 ee->prop.focused = EINA_TRUE; 189 ee->prop.focused = EINA_TRUE;
199 evas_focus_in(ee->evas); 190 evas_focus_in(ee->evas);
200 if (ee->func.fn_focus_in) ee->func.fn_focus_in(ee); 191 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,
208 Ecore_Cocoa_Event_Window *e = event; 199 Ecore_Cocoa_Event_Window *e = event;
209 Ecore_Evas *ee; 200 Ecore_Evas *ee;
210 201
211 DBG("");
212
213 if (!e->wid)
214 return ECORE_CALLBACK_PASS_ON;
215
216 ee = _ecore_evas_cocoa_match(e->wid); 202 ee = _ecore_evas_cocoa_match(e->wid);
203 if ((!ee) || (ee->ignore_events)) return ECORE_CALLBACK_PASS_ON;
217 204
218 if (!ee)
219 {
220 ERR("Unregistered Ecore_Evas for window Id %p", e->wid);
221 return ECORE_CALLBACK_PASS_ON;
222 }
223 evas_focus_out(ee->evas); 205 evas_focus_out(ee->evas);
224 ee->prop.focused = EINA_FALSE; 206 ee->prop.focused = EINA_FALSE;
225 if (ee->func.fn_focus_out) ee->func.fn_focus_out(ee); 207 if (ee->func.fn_focus_out) ee->func.fn_focus_out(ee);