forked from enlightenment/efl
evas: fix backward compatibility issue.
Summary: Sometimes mouse_grabbed flag can not be zero. Before version of EFL, object has just one mouse_grabbed flag. But now we have a new feature, so object has list of pointer devices and each pointer device has mouse_grabbed flag. We need to check all of pointer devices mouse_grabbed flag. And if all of mouse_grabbed flag are zero, dispatch move event. Test Plan: {F3384050} gcc -o button_example_01 button_example_01.c `pkg-config --cflags --libs elementary` Reviewers: iscaro, zmike, Hermet Reviewed By: Hermet Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D7216
This commit is contained in:
parent
e3a2d0be45
commit
46cca0febf
|
@ -2036,15 +2036,25 @@ _hide(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj)
|
|||
((obj->map->cur.map) && (obj->map->cur.map->count == 4) && (obj->map->cur.usemap)))
|
||||
{
|
||||
Evas_Object_Pointer_Data *obj_pdata;
|
||||
|
||||
Eina_Bool mouse_grabbed = EINA_FALSE;
|
||||
EINA_INLIST_FOREACH(obj->events->pointer_grabs, obj_pdata)
|
||||
{
|
||||
if (!obj_pdata->mouse_grabbed &&
|
||||
evas_object_is_in_output_rect(eo_obj, obj, obj_pdata->evas_pdata->seat->x,
|
||||
if (obj_pdata->mouse_grabbed > 0)
|
||||
{
|
||||
mouse_grabbed = EINA_TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!mouse_grabbed)
|
||||
{
|
||||
EINA_INLIST_FOREACH(obj->events->pointer_grabs, obj_pdata)
|
||||
{
|
||||
if (evas_object_is_in_output_rect(eo_obj, obj, obj_pdata->evas_pdata->seat->x,
|
||||
obj_pdata->evas_pdata->seat->y,
|
||||
1, 1))
|
||||
_evas_canvas_event_pointer_move_event_dispatch(obj->layer->evas, obj_pdata->evas_pdata, NULL);
|
||||
}
|
||||
}
|
||||
/* this is at odds to handling events when an obj is moved out of the mouse
|
||||
* ore resized out or clipped out. if mouse is grabbed - regardless of
|
||||
* visibility, mouse move events should keep happening and mouse up.
|
||||
|
|
Loading…
Reference in New Issue