forked from enlightenment/efl
cursor object changes are now rejected if creating the new cursor fails
previous behavior resulted in a deleted cursor
This commit is contained in:
parent
8384b0a0f7
commit
46e9bdd735
|
@ -239,17 +239,19 @@ _elm_cursor_set(Elm_Cursor *cur)
|
|||
if (cur->visible) return;
|
||||
|
||||
evas_event_freeze(cur->evas);
|
||||
cur->visible = EINA_TRUE;
|
||||
if (!cur->use_engine)
|
||||
{
|
||||
if (!cur->obj)
|
||||
_elm_cursor_obj_add(cur->eventarea, cur);
|
||||
ecore_evas_object_cursor_set(cur->ee, cur->obj,
|
||||
ELM_OBJECT_LAYER_CURSOR, cur->hot_x,
|
||||
cur->hot_y);
|
||||
if (cur->obj)
|
||||
ecore_evas_object_cursor_set(cur->ee, cur->obj,
|
||||
ELM_OBJECT_LAYER_CURSOR, cur->hot_x,
|
||||
cur->hot_y);
|
||||
cur->visible = !!cur->obj;
|
||||
}
|
||||
else
|
||||
{
|
||||
cur->visible = EINA_TRUE;
|
||||
if (cur->obj)
|
||||
{
|
||||
evas_object_del(cur->obj);
|
||||
|
|
Loading…
Reference in New Issue