From: Christopher Michael Date: Wed, 11 Jul 2012 11:53:29 +0000 (+0000) Subject: Elm: Commit roberts patch which fixes the unsafe call to X-Git-Tag: v1.7.0~351 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=be725e588fcff3fd7cc2140e0f2954af5054beb2;p=platform%2Fupstream%2Felementary.git Elm: Commit roberts patch which fixes the unsafe call to ecore_evas_window_get with a replacement function that checks the currently used engine first. This fixes a segfault when running elm with the wayland engines. SVN revision: 73568 --- diff --git a/src/lib/elm_cnp.c b/src/lib/elm_cnp.c index 7720e9b..b1c9e1b 100644 --- a/src/lib/elm_cnp.c +++ b/src/lib/elm_cnp.c @@ -442,7 +442,7 @@ _elm_widget_xwin_get(const Evas_Object *obj) if (!evas) return 0; ee = ecore_evas_ecore_evas_get(evas); if (!ee) return 0; - xwin = (Ecore_X_Window)ecore_evas_window_get(ee); + xwin = _elm_ee_xwin_get(ee); } return xwin; diff --git a/src/lib/elm_priv.h b/src/lib/elm_priv.h index e405723..0bed660 100644 --- a/src/lib/elm_priv.h +++ b/src/lib/elm_priv.h @@ -232,6 +232,8 @@ void _elm_win_rescale(Elm_Theme *th, Eina_Bool use_theme); void _elm_win_access(Eina_Bool is_access); void _elm_win_translate(void); +Ecore_X_Window _elm_ee_xwin_get(const Ecore_Evas *ee); + Eina_Bool _elm_theme_object_set(Evas_Object *parent, Evas_Object *o, const char *clas, const char *group, const char *style); Eina_Bool _elm_theme_object_icon_set(Evas_Object *o, const char *group, const char *style); Eina_Bool _elm_theme_set(Elm_Theme *th, Evas_Object *o, const char *clas, const char *group, const char *style); diff --git a/src/lib/elm_win.c b/src/lib/elm_win.c index 36f1a3f..daa588b 100644 --- a/src/lib/elm_win.c +++ b/src/lib/elm_win.c @@ -1266,7 +1266,7 @@ _elm_win_delete_request(Ecore_Evas *ee) evas_object_unref(obj); } -static Ecore_X_Window +Ecore_X_Window _elm_ee_xwin_get(const Ecore_Evas *ee) { #ifdef HAVE_ELEMENTARY_X