From 536e60643bb12619859eb3b69d88b7c6dfed2f17 Mon Sep 17 00:00:00 2001 From: Daniel Juyung Seo Date: Mon, 13 Jan 2014 23:14:44 +0900 Subject: [PATCH] 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 5f82faba1..d9b833b89 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 b714aa26e..e736b519e 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 && -- 2.34.1