ecore evas should not crash when unsetting pointer

ref D812

disappointed.jpg
This commit is contained in:
Mike Blumenkrantz 2015-02-06 17:54:08 -05:00
parent 88e5369eee
commit 7171135792
15 changed files with 71 additions and 1 deletions

View File

@ -572,6 +572,7 @@ static Ecore_Evas_Engine_Func _ecore_buffer_engine_func =
NULL,
NULL,
NULL,
NULL,
_ecore_evas_buffer_alpha_set,
NULL, //transparent
NULL, // profiles_set

View File

@ -406,6 +406,12 @@ _ecore_evas_ews_object_cursor_del(void *data, Evas *e EINA_UNUSED, Evas_Object *
ee->prop.cursor.object = NULL;
}
static void
_ecore_evas_ews_object_cursor_unset(Ecore_Evas *ee)
{
evas_object_event_callback_del_full(ee->prop.cursor.object, EVAS_CALLBACK_DEL, _ecore_evas_ews_object_cursor_del, ee);
}
static void
_ecore_evas_ews_object_cursor_set(Ecore_Evas *ee, Evas_Object *obj, int layer, int hot_x, int hot_y)
{
@ -671,6 +677,7 @@ static const Ecore_Evas_Engine_Func _ecore_ews_engine_func =
_ecore_evas_ews_size_base_set,
_ecore_evas_ews_size_step_set,
_ecore_evas_ews_object_cursor_set,
_ecore_evas_ews_object_cursor_unset,
_ecore_evas_ews_layer_set,
_ecore_evas_ews_focus_set,
_ecore_evas_ews_iconified_set,

View File

@ -87,6 +87,7 @@ struct _Ecore_Evas_Engine_Func
void (*fn_size_base_set) (Ecore_Evas *ee, int w, int h);
void (*fn_size_step_set) (Ecore_Evas *ee, int w, int h);
void (*fn_object_cursor_set) (Ecore_Evas *ee, Evas_Object *obj, int layer, int hot_x, int hot_y);
void (*fn_object_cursor_unset) (Ecore_Evas *ee);
void (*fn_layer_set) (Ecore_Evas *ee, int layer);
void (*fn_focus_set) (Ecore_Evas *ee, Eina_Bool on);
void (*fn_iconified_set) (Ecore_Evas *ee, Eina_Bool on);

View File

@ -345,6 +345,12 @@ _ecore_evas_object_cursor_del(void *data, Evas *e EINA_UNUSED, Evas_Object *obj
ee->prop.cursor.object = NULL;
}
static void
_ecore_evas_object_cursor_unset(Ecore_Evas *ee)
{
evas_object_event_callback_del_full(ee->prop.cursor.object, EVAS_CALLBACK_DEL, _ecore_evas_object_cursor_del, ee);
}
static void
_ecore_evas_object_cursor_set(Ecore_Evas *ee, Evas_Object *obj, int layer, int hot_x, int hot_y)
{
@ -465,6 +471,7 @@ static Ecore_Evas_Engine_Func _ecore_cocoa_engine_func =
NULL,
NULL,
_ecore_evas_object_cursor_set,
_ecore_evas_object_cursor_unset,
NULL,
NULL,
NULL,

View File

@ -53,6 +53,7 @@ static void _ecore_evas_drm_size_max_set(Ecore_Evas *ee, int w, int h);
static void _ecore_evas_drm_size_base_set(Ecore_Evas *ee, int w, int h);
static void _ecore_evas_drm_size_step_set(Ecore_Evas *ee, int w, int h);
static void _ecore_evas_drm_object_cursor_set(Ecore_Evas *ee, Evas_Object *obj, int layer, int hot_x, int hot_y);
static void _ecore_evas_drm_object_cursor_unset(Ecore_Evas *ee);
static void _ecore_evas_drm_layer_set(Ecore_Evas *ee, int layer);
static void _ecore_evas_drm_iconified_set(Ecore_Evas *ee, Eina_Bool on);
static void _ecore_evas_drm_borderless_set(Ecore_Evas *ee, Eina_Bool on);
@ -110,6 +111,7 @@ static Ecore_Evas_Engine_Func _ecore_evas_drm_engine_func =
_ecore_evas_drm_size_base_set,
_ecore_evas_drm_size_step_set,
_ecore_evas_drm_object_cursor_set,
_ecore_evas_drm_object_cursor_unset,
_ecore_evas_drm_layer_set,
NULL, //void (*fn_focus_set) (Ecore_Evas *ee, Eina_Bool on);
_ecore_evas_drm_iconified_set,
@ -763,6 +765,12 @@ _ecore_evas_drm_object_cursor_del(void *data, Evas *e EINA_UNUSED, Evas_Object *
if ((ee = data)) ee->prop.cursor.object = NULL;
}
static void
_ecore_evas_drm_object_cursor_unset(Ecore_Evas *ee)
{
evas_object_event_callback_del_full(ee->prop.cursor.object, EVAS_CALLBACK_DEL, _ecore_evas_drm_object_cursor_del, ee);
}
static void
_ecore_evas_drm_object_cursor_set(Ecore_Evas *ee, Evas_Object *obj, int layer, int hot_x, int hot_y)
{

View File

@ -850,6 +850,7 @@ static const Ecore_Evas_Engine_Func _ecore_extn_plug_engine_func =
NULL,
NULL,
NULL,
NULL,
NULL, //transparent
NULL, // profiles_set
_ecore_evas_extn_plug_profile_set,
@ -1986,6 +1987,7 @@ static const Ecore_Evas_Engine_Func _ecore_extn_socket_engine_func =
NULL,
NULL,
NULL,
NULL,
_ecore_evas_extn_socket_alpha_set,
NULL, //transparent
_ecore_evas_extn_socket_available_profiles_set,

View File

@ -425,6 +425,12 @@ _ecore_evas_object_cursor_del(void *data, Evas *e EINA_UNUSED, Evas_Object *obj
ee->prop.cursor.object = NULL;
}
static void
_ecore_evas_object_cursor_unset(Ecore_Evas *ee)
{
evas_object_event_callback_del_full(ee->prop.cursor.object, EVAS_CALLBACK_DEL, _ecore_evas_object_cursor_del, ee);
}
static void
_ecore_evas_object_cursor_set(Ecore_Evas *ee, Evas_Object *obj, int layer, int hot_x, int hot_y)
{
@ -572,6 +578,7 @@ static Ecore_Evas_Engine_Func _ecore_fb_engine_func =
NULL,
NULL,
_ecore_evas_object_cursor_set,
_ecore_evas_object_cursor_unset,
NULL,
NULL,
NULL,

View File

@ -315,6 +315,12 @@ _ecore_evas_object_cursor_del(void *data, Evas *e EINA_UNUSED, Evas_Object *obj
ee->prop.cursor.object = NULL;
}
static void
_ecore_evas_object_cursor_unset(Ecore_Evas *ee)
{
evas_object_event_callback_del_full(ee->prop.cursor.object, EVAS_CALLBACK_DEL, _ecore_evas_object_cursor_del, ee);
}
static void
_ecore_evas_object_cursor_set(Ecore_Evas *ee, Evas_Object *obj, int layer, int hot_x, int hot_y)
{
@ -394,6 +400,7 @@ static Ecore_Evas_Engine_Func _ecore_psl1ght_engine_func =
NULL,
NULL,
_ecore_evas_object_cursor_set,
_ecore_evas_object_cursor_unset,
NULL,
NULL,
NULL,

View File

@ -403,6 +403,12 @@ _ecore_evas_object_cursor_del(void *data, Evas *e EINA_UNUSED, Evas_Object *obj
if (ee) ee->prop.cursor.object = NULL;
}
static void
_ecore_evas_object_cursor_unset(Ecore_Evas *ee)
{
evas_object_event_callback_del_full(ee->prop.cursor.object, EVAS_CALLBACK_DEL, _ecore_evas_object_cursor_del, ee);
}
static void
_ecore_evas_object_cursor_set(Ecore_Evas *ee, Evas_Object *obj, int layer, int hot_x, int hot_y)
{
@ -483,6 +489,7 @@ static Ecore_Evas_Engine_Func _ecore_sdl_engine_func =
NULL,
NULL,
_ecore_evas_object_cursor_set,
_ecore_evas_object_cursor_unset,
NULL,
NULL,
NULL,

View File

@ -1211,6 +1211,12 @@ _ecore_evas_object_cursor_del(void *data, Evas *e EINA_UNUSED, Evas_Object *obj
if (ee) ee->prop.cursor.object = NULL;
}
void
_ecore_evas_wl_common_object_cursor_unset(Ecore_Evas *ee)
{
evas_object_event_callback_del_full(ee->prop.cursor.object, EVAS_CALLBACK_DEL, _ecore_evas_object_cursor_del, ee);
}
void
_ecore_evas_wl_common_object_cursor_set(Ecore_Evas *ee, Evas_Object *obj, int layer, int hot_x, int hot_y)
{

View File

@ -51,6 +51,7 @@ static Ecore_Evas_Engine_Func _ecore_wl_engine_func =
_ecore_evas_wl_common_size_base_set,
_ecore_evas_wl_common_size_step_set,
_ecore_evas_wl_common_object_cursor_set,
_ecore_evas_wl_common_object_cursor_unset,
_ecore_evas_wl_common_layer_set,
NULL, // focus set
_ecore_evas_wl_common_iconified_set,

View File

@ -63,6 +63,7 @@ void _ecore_evas_wl_common_size_base_set(Ecore_Evas *ee, int w, int h);
void _ecore_evas_wl_common_size_step_set(Ecore_Evas *ee, int w, int h);
void _ecore_evas_wl_common_aspect_set(Ecore_Evas *ee, double aspect);
void _ecore_evas_wl_common_object_cursor_set(Ecore_Evas *ee, Evas_Object *obj, int layer, int hot_x, int hot_y);
void _ecore_evas_wl_common_object_cursor_unset(Ecore_Evas *ee);
void _ecore_evas_wl_common_layer_set(Ecore_Evas *ee, int layer);
void _ecore_evas_wl_common_iconified_set(Ecore_Evas *ee, Eina_Bool on);
void _ecore_evas_wl_common_maximized_set(Ecore_Evas *ee, Eina_Bool on);

View File

@ -51,6 +51,7 @@ static Ecore_Evas_Engine_Func _ecore_wl_engine_func =
_ecore_evas_wl_common_size_base_set,
_ecore_evas_wl_common_size_step_set,
_ecore_evas_wl_common_object_cursor_set,
_ecore_evas_wl_common_object_cursor_unset,
_ecore_evas_wl_common_layer_set,
NULL, // focus set
_ecore_evas_wl_common_iconified_set,

View File

@ -821,7 +821,13 @@ _ecore_evas_object_cursor_del(void *data, Evas *e EINA_UNUSED, Evas_Object *obj
ee = data;
if (ee) ee->prop.cursor.object = NULL;
}
static void
_ecore_evas_win32_object_cursor_unset(Ecore_Evas *ee)
{
evas_object_event_callback_del_full(ee->prop.cursor.object, EVAS_CALLBACK_DEL, _ecore_evas_object_cursor_del, ee);
}
static void
_ecore_evas_win32_cursor_set(Ecore_Evas *ee, Evas_Object *obj, int layer, int hot_x, int hot_y)
{
@ -1131,6 +1137,7 @@ static Ecore_Evas_Engine_Func _ecore_win32_engine_func =
_ecore_evas_win32_size_base_set,
_ecore_evas_win32_size_step_set,
_ecore_evas_win32_cursor_set,
_ecore_evas_win32_cursor_unset,
NULL, /* _ecore_evas_x_layer_set */
_ecore_evas_win32_focus_set,
_ecore_evas_win32_iconified_set,

View File

@ -2978,6 +2978,12 @@ _ecore_evas_object_cursor_del(void *data, Evas *e EINA_UNUSED, Evas_Object *obj
if (ee) ee->prop.cursor.object = NULL;
}
static void
_ecore_evas_x_object_cursor_unset(Ecore_Evas *ee)
{
evas_object_event_callback_del_full(ee->prop.cursor.object, EVAS_CALLBACK_DEL, _ecore_evas_object_cursor_del, ee);
}
static void
_ecore_evas_x_object_cursor_set(Ecore_Evas *ee, Evas_Object *obj, int layer, int hot_x, int hot_y)
{
@ -3552,6 +3558,7 @@ static Ecore_Evas_Engine_Func _ecore_x_engine_func =
_ecore_evas_x_size_base_set,
_ecore_evas_x_size_step_set,
_ecore_evas_x_object_cursor_set,
_ecore_evas_x_object_cursor_unset,
_ecore_evas_x_layer_set,
_ecore_evas_x_focus_set,
_ecore_evas_x_iconified_set,