[access] evas_call_smarts_calculate(); makes evas_event_feed_mouse_move();

so new object would be highlighted if there is new object under the previous mouse(cursor) position.
to fix this issue, elm_access is using the mouse_event_enable flag. but it would cause a problem as
following case: 1. create input window in access module, 2. read something, 3. disable access module
this would be resolved by export api to set mouse_event_enable flag the other day.


SVN revision: 82933
This commit is contained in:
Shinwoo Kim 2013-01-17 11:32:14 +00:00
parent 7f91ad4183
commit b7e997b9fb
3 changed files with 30 additions and 4 deletions

View File

@ -5,6 +5,8 @@
#define MY_CLASS_NAME "elm_access"
static Eina_Bool mouse_event_enable = EINA_TRUE;
static Evas_Object * _elm_access_add(Evas_Object *parent);
static void
@ -126,7 +128,10 @@ _access_obj_over_timeout_cb(void *data)
static void
_access_obj_mouse_in_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
Elm_Access_Info *ac = evas_object_data_get(data, "_elm_access");
Elm_Access_Info *ac;
if (!mouse_event_enable) return;
ac = evas_object_data_get(data, "_elm_access");
if (!ac) return;
if (ac->delay_timer)
@ -141,8 +146,12 @@ _access_obj_mouse_in_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSE
static void
_access_obj_mouse_out_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
Elm_Access_Info *ac = evas_object_data_get(data, "_elm_access");
Elm_Access_Info *ac;
if (!mouse_event_enable) return;
ac = evas_object_data_get(data, "_elm_access");
if (!ac) return;
_elm_access_object_unhilight(data);
if (ac->delay_timer)
{
@ -240,6 +249,13 @@ _access_highlight_object_get(Evas_Object *obj)
return ho;
}
void _elm_access_mouse_event_enabled_set(Eina_Bool enabled)
{
enabled = !!enabled;
if (mouse_event_enable == enabled) return;
mouse_event_enable = enabled;
}
//-------------------------------------------------------------------------//
EAPI void
_elm_access_highlight_set(Evas_Object* obj)

View File

@ -486,6 +486,7 @@ struct _Elm_Access_Info
Evas_Object *part_object;
};
void _elm_access_mouse_event_enabled_set(Eina_Bool enabled);
EAPI void _elm_access_clear(Elm_Access_Info *ac);
EAPI void _elm_access_text_set(Elm_Access_Info *ac, int type, const char *text);
EAPI void _elm_access_callback_set(Elm_Access_Info *ac, int type, Elm_Access_Info_Cb func, const void *data);

View File

@ -2000,8 +2000,17 @@ _elm_win_client_message(void *data,
ECORE_X_ATOM_E_ILLUME_ACCESS_ACTION_READ)
{
/* there would be better way to read highlight object */
ecore_x_mouse_in_send(sd->x.xwin, e->data.l[2], e->data.l[3]);
ecore_x_mouse_move_send(sd->x.xwin, e->data.l[2], e->data.l[3]);
Evas *evas;
evas = evas_object_evas_get(sd->obj);
if (!evas) return ECORE_CALLBACK_PASS_ON;
_elm_access_mouse_event_enabled_set(EINA_TRUE);
evas_event_feed_mouse_in(evas, 0, NULL);
evas_event_feed_mouse_move
(evas, e->data.l[2], e->data.l[3], 0, NULL);
_elm_access_mouse_event_enabled_set(EINA_FALSE);
}
else if ((unsigned int)e->data.l[1] ==
ECORE_X_ATOM_E_ILLUME_ACCESS_ACTION_READ_NEXT)