ecore_evas/x: Fixed that cursor object was not disappear

When moved mouse among two objects having cursor set,
EVAS_CALLBACK_MOUSE_OUT and EVAS_CALLBACK_MOUSE_IN are fired.

I observed that evas_object_del in callback of EVAS_CALLBACK_MOUSE_OUT
calls EVAS_CALLBACK_MOUSE_IN
so that newly added cursor object was detached.
This commit is contained in:
Ryuan Choi 2013-05-21 09:38:19 +09:00 committed by Carsten Haitzler (Rasterman)
parent 99be49551e
commit 32b3132c84
1 changed files with 6 additions and 3 deletions

View File

@ -2628,9 +2628,9 @@ static void
_ecore_evas_x_object_cursor_set(Ecore_Evas *ee, Evas_Object *obj, int layer, int hot_x, int hot_y)
{
int x, y;
Evas_Object* old;
if (ee->prop.cursor.object) evas_object_del(ee->prop.cursor.object);
old = ee->prop.cursor.object;
if (!obj)
{
ee->prop.cursor.object = NULL;
@ -2638,7 +2638,7 @@ _ecore_evas_x_object_cursor_set(Ecore_Evas *ee, Evas_Object *obj, int layer, int
ee->prop.cursor.hot.x = 0;
ee->prop.cursor.hot.y = 0;
ecore_x_window_cursor_show(ee->prop.window, 1);
return;
goto end;
}
ee->prop.cursor.object = obj;
@ -2658,6 +2658,9 @@ _ecore_evas_x_object_cursor_set(Ecore_Evas *ee, Evas_Object *obj, int layer, int
evas_object_show(ee->prop.cursor.object);
evas_object_event_callback_add(obj, EVAS_CALLBACK_DEL, _ecore_evas_object_cursor_del, ee);
end:
if (old) evas_object_del(old);
}
/*