From b35412f8877b8db1548399e1fdc8b9a49e2f3a81 Mon Sep 17 00:00:00 2001 From: Jean Guyomarc'h Date: Tue, 13 Oct 2015 16:40:49 +0200 Subject: [PATCH] win: add Cocoa support for elm_win_window_id_get() API Change-Id: Iaa6e73572ceec87b4c1533bdae7dd76bba8ae812 Signed-off-by: Cedric BAIL --- src/lib/elm_win.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/lib/elm_win.c b/src/lib/elm_win.c index f1ec029..c8b4d6f 100644 --- a/src/lib/elm_win.c +++ b/src/lib/elm_win.c @@ -6328,6 +6328,20 @@ _elm_win_window_id_get(Eo *obj EINA_UNUSED, Elm_Win_Data *sd) if (sd->parent) return (Ecore_Window)elm_win_xwindow_get(sd->parent); #endif } + else if (engine_name && + ((!strcmp(engine_name, ELM_OPENGL_COCOA)) || + (!strcmp(engine_name, "gl_cocoa")))) + { +#ifdef HAVE_ELEMENTARY_COCOA + if (sd->cocoa.win) return (Ecore_Window)(sd->cocoa.win); + if (sd->parent) + { + Ecore_Cocoa_Window *pwin; + eo_do(sd->parent, pwin = elm_obj_win_cocoa_window_get()); + return (Ecore_Window)pwin; + } +#endif + } return 0; } -- 2.7.4