discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=06db737a23f28ba878577a761f7f3aceef3276ec

commit 06db737a23f28ba878577a761f7f3aceef3276ec
Author: Mike Blumenkrantz <zm...@osg.samsung.com>
Date:   Fri Nov 18 11:03:37 2016 -0500

    elm_cursor: restore compat with previous theme api
    
    adding new theme groups/parts is fine, but compat must be maintained for
    released theme api: anything which is namespaced
    
    ref 1422e61e6207ed6fe21063a15a8fb8475eef9865
---
 data/elementary/themes/edc/elm/cursor.edc |  6 ++++++
 src/lib/elementary/els_cursor.c           | 11 ++++++++++-
 2 files changed, 16 insertions(+), 1 deletion(-)

diff --git a/data/elementary/themes/edc/elm/cursor.edc 
b/data/elementary/themes/edc/elm/cursor.edc
index 67e374a..f836f9d 100644
--- a/data/elementary/themes/edc/elm/cursor.edc
+++ b/data/elementary/themes/edc/elm/cursor.edc
@@ -98,6 +98,8 @@ group { name: "elm/cursor/hand1/default";
             rel2.offset: 0 0;
          }
       }
+      /* elm.content.hotspot is the old name for the above part */
+      alias: "elm.content.hotspot" "elm.swallow.hotspot";
    }
 }
 
@@ -109,6 +111,8 @@ group { name: "elm/cursor/blank/default";
             max: 1 1;
          }
       }
+      /* elm.content.hotspot is the old name for the above part */
+      alias: "elm.content.hotspot" "elm.swallow.hotspot";
    }
 }
 
@@ -137,6 +141,8 @@ group { name: "elm/cursor/xterm/default";
             rel2.offset: 0 0;
          }
       }
+      /* elm.content.hotspot is the old name for the above part */
+      alias: "elm.content.hotspot" "elm.swallow.hotspot";
       part { name: "shine";
          description { state: "default" 0.0;
             rel1.to: "base";
diff --git a/src/lib/elementary/els_cursor.c b/src/lib/elementary/els_cursor.c
index 9ffc4b7..3bb29bf 100644
--- a/src/lib/elementary/els_cursor.c
+++ b/src/lib/elementary/els_cursor.c
@@ -277,7 +277,16 @@ _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);
-   edje_object_part_swallow(cur->obj, "elm.swallow.hotspot", cur->hotobj);
+   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;
+     }
 
    evas_object_event_callback_add(cur->obj, EVAS_CALLBACK_DEL,
                                   _elm_cursor_obj_del, cur);

-- 


Reply via email to