seoz pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=536e60643bb12619859eb3b69d88b7c6dfed2f17

commit 536e60643bb12619859eb3b69d88b7c6dfed2f17
Author: Daniel Juyung Seo <seojuyu...@gmail.com>
Date:   Mon Jan 13 23:14:44 2014 +0900

    ctxpopup, entry: Check widget type by eo_isa not by evas_object_type
    string compare.
---
 src/lib/elc_ctxpopup.c | 4 ++--
 src/lib/elm_entry.c    | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/lib/elc_ctxpopup.c b/src/lib/elc_ctxpopup.c
index 5f82fab..d9b833b 100644
--- a/src/lib/elc_ctxpopup.c
+++ b/src/lib/elc_ctxpopup.c
@@ -230,7 +230,7 @@ _base_geometry_calc(Evas_Object *obj,
    evas_object_geometry_get
      (sd->parent, &hover_area.x, &hover_area.y, &hover_area.w,
      &hover_area.h);
-   if (!strcmp(evas_object_type_get(sd->parent), "elm_win"))
+   if (sd->parent && eo_isa(sd->parent, ELM_OBJ_WIN_CLASS))
      hover_area.x = hover_area.y = 0;
 
    evas_object_geometry_get(obj, &pos.x, &pos.y, NULL, NULL);
@@ -1257,7 +1257,7 @@ _hover_parent_set(Eo *obj, void *_pd, va_list *list)
 
    //Update Background
    evas_object_geometry_get(parent, &x, &y, &w, &h);
-   if (!strcmp(evas_object_type_get(parent), "elm_win"))
+   if (parent && eo_isa(parent, ELM_OBJ_WIN_CLASS))
      x = y = 0;
    evas_object_move(sd->bg, x, y);
    evas_object_resize(sd->bg, w, h);
diff --git a/src/lib/elm_entry.c b/src/lib/elm_entry.c
index b714aa2..e736b51 100644
--- a/src/lib/elm_entry.c
+++ b/src/lib/elm_entry.c
@@ -912,7 +912,7 @@ _elm_entry_smart_on_focus(Eo *obj, void *_pd EINA_UNUSED, 
va_list *list)
    Elm_Entry_Smart_Data *sd = _pd;
 
    top = elm_widget_top_get(obj);
-   if (!strcmp(evas_object_type_get(top), "elm_win"))
+   if (top && eo_isa(top, ELM_OBJ_WIN_CLASS))
      top_is_win = EINA_TRUE;
 
    if (!sd->editable) return;
@@ -1597,7 +1597,7 @@ _mouse_up_cb(void *data,
              top = elm_widget_top_get(data);
              if (top)
                {
-                  if (!strcmp(evas_object_type_get(top), "elm_win"))
+                  if (top && eo_isa(top, ELM_OBJ_WIN_CLASS))
                     top_is_win = EINA_TRUE;
 
                   if (top_is_win && sd->input_panel_enable && 
sd->input_panel_show_on_demand &&

-- 


Reply via email to