Elm: Commit roberts patch which fixes the unsafe call to
authorChristopher Michael <cpmichael1@comcast.net>
Wed, 11 Jul 2012 11:53:29 +0000 (11:53 +0000)
committerChristopher Michael <cpmichael1@comcast.net>
Wed, 11 Jul 2012 11:53:29 +0000 (11:53 +0000)
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

src/lib/elm_cnp.c
src/lib/elm_priv.h
src/lib/elm_win.c

index 7720e9b..b1c9e1b 100644 (file)
@@ -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;
index e405723..0bed660 100644 (file)
@@ -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);
index 36f1a3f..daa588b 100644 (file)
@@ -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