forked from enlightenment/efl
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:
parent
99be49551e
commit
32b3132c84
|
@ -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)
|
_ecore_evas_x_object_cursor_set(Ecore_Evas *ee, Evas_Object *obj, int layer, int hot_x, int hot_y)
|
||||||
{
|
{
|
||||||
int x, 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)
|
if (!obj)
|
||||||
{
|
{
|
||||||
ee->prop.cursor.object = NULL;
|
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.x = 0;
|
||||||
ee->prop.cursor.hot.y = 0;
|
ee->prop.cursor.hot.y = 0;
|
||||||
ecore_x_window_cursor_show(ee->prop.window, 1);
|
ecore_x_window_cursor_show(ee->prop.window, 1);
|
||||||
return;
|
goto end;
|
||||||
}
|
}
|
||||||
|
|
||||||
ee->prop.cursor.object = obj;
|
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_show(ee->prop.cursor.object);
|
||||||
|
|
||||||
evas_object_event_callback_add(obj, EVAS_CALLBACK_DEL, _ecore_evas_object_cursor_del, ee);
|
evas_object_event_callback_add(obj, EVAS_CALLBACK_DEL, _ecore_evas_object_cursor_del, ee);
|
||||||
|
|
||||||
|
end:
|
||||||
|
if (old) evas_object_del(old);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in New Issue