ctxpopup, entry: Check widget type by eo_isa not by evas_object_type
authorDaniel Juyung Seo <seojuyung2@gmail.com>
Mon, 13 Jan 2014 14:14:44 +0000 (23:14 +0900)
committerDaniel Juyung Seo <seojuyung2@gmail.com>
Mon, 13 Jan 2014 14:14:44 +0000 (23:14 +0900)
string compare.

src/lib/elc_ctxpopup.c
src/lib/elm_entry.c

index 5f82faba16b880270aa1c431f7ff2daee7f73017..d9b833b89ff46dbbadb4523ef720c84f7fb1e303 100644 (file)
@@ -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);
index b714aa26e36802c41903e416f6b6a1f359e5aec6..e736b519e0f119241804b5afbfdca7a09f5c4509 100644 (file)
@@ -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 &&