raster pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=4650338c076c31a6c913a0b5779b8e24e8d9e6fb
commit 4650338c076c31a6c913a0b5779b8e24e8d9e6fb Author: wonguk.jeong <[email protected]> Date: Tue Apr 1 19:54:09 2014 +0900 cnp: check object type before getting window id Summary: problem: 1) elementary_test -> entry -> close entry window 2) type mismatch warning is shown on console as below ERR<19427>:eo lib/eo/eo.c:342 _eo_dov_internal() in elm_win.eo.c:2067: Can't execute function Elm_Win:ELM_OBJ_WIN_SUB_ID_XWINDOW_GET (op 0x167) for class 'Elm_Entry'. Aborting. solution: check top object type before invoke elm_win_xwindow_get()/elm_wl_window_get(). if it's not a window, find window id by using ecore_evas APIs. Fixes T1141 Test Plan: elementary_test -> entry -> close entry window -> check console Reviewers: raster, seoz, uartie Reviewed By: raster CC: seoz Maniphest Tasks: T1141 Differential Revision: https://phab.enlightenment.org/D684 --- src/lib/elm_cnp.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/lib/elm_cnp.c b/src/lib/elm_cnp.c index 35af060..df107a4 100644 --- a/src/lib/elm_cnp.c +++ b/src/lib/elm_cnp.c @@ -1826,7 +1826,8 @@ _x11_elm_widget_xwin_get(const Evas_Object *obj) par = elm_widget_parent_widget_get(obj); if (par) top = elm_widget_top_get(par); } - if (top) xwin = elm_win_xwindow_get(top); + if (top && (eo_isa(top, ELM_OBJ_WIN_CLASS))) + xwin = elm_win_xwindow_get(top); } if (!xwin) { @@ -3423,7 +3424,8 @@ _wl_elm_widget_window_get(Evas_Object *obj) { top = elm_widget_top_get(obj); if (!top) top = elm_widget_top_get(elm_widget_parent_widget_get(obj)); - if (top) win = elm_win_wl_window_get(top); + if (top && (eo_isa(top, ELM_OBJ_WIN_CLASS))) + win = elm_win_wl_window_get(top); } if (!win) { --
