aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/elementary/els_cursor.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/elementary/els_cursor.c')
-rw-r--r--src/lib/elementary/els_cursor.c35
1 files changed, 24 insertions, 11 deletions
diff --git a/src/lib/elementary/els_cursor.c b/src/lib/elementary/els_cursor.c
index 680d3df0aa..f3fe2839b9 100644
--- a/src/lib/elementary/els_cursor.c
+++ b/src/lib/elementary/els_cursor.c
@@ -289,19 +289,32 @@ _elm_cursor_obj_add(Evas_Object *obj, Elm_Cursor *cur)
_elm_cursor_hot_change, cur);
evas_object_event_callback_add(cur->hotobj, EVAS_CALLBACK_RESIZE,
_elm_cursor_hot_change, cur);
- if (edje_object_part_exists(cur->obj, "elm.swallow.hotspot"))
- edje_object_part_swallow(cur->obj, "elm.swallow.hotspot", cur->hotobj);
- else if (edje_object_part_exists(cur->obj, "elm.content.hotspot"))
- edje_object_part_swallow(cur->obj, "elm.content.hotspot", cur->hotobj);
- else if (edje_object_part_exists(cur->obj, "hotspot"))
- edje_object_part_swallow(cur->obj, "hotspot", cur->hotobj);
- else if (edje_object_part_exists(cur->obj, "content.hotspot"))
- edje_object_part_swallow(cur->obj, "content.hotspot", cur->hotobj);
+
+ if (elm_widget_is_legacy(obj))
+ {
+ if (edje_object_part_exists(cur->obj, "elm.swallow.hotspot"))
+ edje_object_part_swallow(cur->obj, "elm.swallow.hotspot", cur->hotobj);
+ else if (edje_object_part_exists(cur->obj, "elm.content.hotspot"))
+ edje_object_part_swallow(cur->obj, "elm.content.hotspot", cur->hotobj);
+ else
+ {
+ ELM_SAFE_FREE(cur->hotobj, evas_object_del);
+ ELM_SAFE_FREE(cur->obj, evas_object_del);
+ return EINA_FALSE;
+ }
+ }
else
{
- ELM_SAFE_FREE(cur->hotobj, evas_object_del);
- ELM_SAFE_FREE(cur->obj, evas_object_del);
- return EINA_FALSE;
+ if (edje_object_part_exists(cur->obj, "hotspot"))
+ edje_object_part_swallow(cur->obj, "hotspot", cur->hotobj);
+ else if (edje_object_part_exists(cur->obj, "content.hotspot"))
+ edje_object_part_swallow(cur->obj, "content.hotspot", cur->hotobj);
+ else
+ {
+ ELM_SAFE_FREE(cur->hotobj, evas_object_del);
+ ELM_SAFE_FREE(cur->obj, evas_object_del);
+ return EINA_FALSE;
+ }
}
evas_object_event_callback_add(cur->obj, EVAS_CALLBACK_DEL,