e->last_timestamp, NULL);
}
+static Eina_Bool
+_evas_object_event_valid_check(Evas_Object *obj)
+{
+ return ((obj->cur.visible) && (obj->delete_me == 0) &&
+ (!obj->clip.clipees) &&
+ (!evas_event_passes_through(obj)) &&
+ (evas_object_clippers_is_visible(obj)) &&
+ (obj->mouse_in));
+}
+
+static Eina_Bool
+_evas_object_event_visible_check(Evas_Object *obj)
+{
+ return ((obj->cur.visible) && (obj->delete_me == 0) &&
+ (!obj->clip.clipees) &&
+ (!evas_event_passes_through(obj)) &&
+ (evas_object_clippers_is_visible(obj)));
+}
+
EAPI void
evas_event_feed_mouse_down(Evas *e, int b, Evas_Button_Flags flags, unsigned int timestamp, const void *data)
{
copy = evas_event_list_copy(e->pointer.object.in);
EINA_LIST_FOREACH(copy, l, obj)
{
- if (obj->delete_me) continue;
-
- ev.canvas.x = e->pointer.x;
- ev.canvas.y = e->pointer.y;
- _evas_event_havemap_adjust(obj, &ev.canvas.x, &ev.canvas.y, obj->mouse_grabbed);
- if (obj->pointer_mode != EVAS_OBJECT_POINTER_MODE_NOGRAB)
+ if (_evas_object_event_valid_check(obj))
{
- obj->mouse_grabbed++;
- e->pointer.mouse_grabbed++;
+ ev.canvas.x = e->pointer.x;
+ ev.canvas.y = e->pointer.y;
+ _evas_event_havemap_adjust(obj, &ev.canvas.x, &ev.canvas.y,
+ obj->mouse_grabbed);
+ if (obj->pointer_mode != EVAS_OBJECT_POINTER_MODE_NOGRAB)
+ {
+ obj->mouse_grabbed++;
+ e->pointer.mouse_grabbed++;
+ }
+
+ if (e->events_frozen <= 0)
+ evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_DOWN,
+ &ev);
}
-
- if (e->events_frozen <= 0)
- evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_DOWN, &ev);
if (e->delete_me) break;
}
if (copy) eina_list_free(copy);
copy = evas_event_list_copy(e->pointer.object.in);
EINA_LIST_FOREACH(copy, l, obj)
{
- ev.canvas.x = e->pointer.x;
- ev.canvas.y = e->pointer.y;
- _evas_event_havemap_adjust(obj, &ev.canvas.x, &ev.canvas.y, obj->mouse_grabbed);
- if ((obj->pointer_mode != EVAS_OBJECT_POINTER_MODE_NOGRAB) &&
- (obj->mouse_grabbed > 0))
- {
- obj->mouse_grabbed--;
- e->pointer.mouse_grabbed--;
- }
- if (!obj->delete_me)
+ if (_evas_object_event_valid_check(obj))
{
+ ev.canvas.x = e->pointer.x;
+ ev.canvas.y = e->pointer.y;
+ _evas_event_havemap_adjust(obj, &ev.canvas.x, &ev.canvas.y,
+ obj->mouse_grabbed);
+ if ((obj->pointer_mode != EVAS_OBJECT_POINTER_MODE_NOGRAB) &&
+ (obj->mouse_grabbed > 0))
+ {
+ obj->mouse_grabbed--;
+ e->pointer.mouse_grabbed--;
+ }
if (e->events_frozen <= 0)
- evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_UP, &ev);
+ evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_UP, &ev);
}
if (e->delete_me) break;
}
EINA_LIST_FOREACH(copy, l, obj)
{
- ev.canvas.x = e->pointer.x;
- ev.canvas.y = e->pointer.y;
- _evas_event_havemap_adjust(obj, &ev.canvas.x, &ev.canvas.y, obj->mouse_grabbed);
- if (e->events_frozen <= 0)
- evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_WHEEL, &ev);
+ if (_evas_object_event_valid_check(obj))
+ {
+ ev.canvas.x = e->pointer.x;
+ ev.canvas.y = e->pointer.y;
+ _evas_event_havemap_adjust(obj, &ev.canvas.x, &ev.canvas.y,
+ obj->mouse_grabbed);
+ if (e->events_frozen <= 0)
+ evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_WHEEL, &ev);
+ }
if (e->delete_me) break;
}
if (copy) copy = eina_list_free(copy);
copy = evas_event_list_copy(e->pointer.object.in);
EINA_LIST_FOREACH(copy, l, obj)
{
- ev.cur.canvas.x = e->pointer.x;
- ev.cur.canvas.y = e->pointer.y;
- _evas_event_havemap_adjust(obj, &ev.cur.canvas.x, &ev.cur.canvas.y, obj->mouse_grabbed);
- if ((obj->cur.visible) &&
- (evas_object_clippers_is_visible(obj)) &&
- (!evas_event_passes_through(obj)) &&
- (!obj->clip.clipees))
+ if (_evas_object_event_valid_check(obj))
{
+ ev.cur.canvas.x = e->pointer.x;
+ ev.cur.canvas.y = e->pointer.y;
+ _evas_event_havemap_adjust(obj, &ev.cur.canvas.x, &ev.cur.canvas.y, obj->mouse_grabbed);
if ((px != x) || (py != y))
{
if (e->events_frozen <= 0)
ins = evas_event_objects_event_list(e, NULL, e->pointer.x, e->pointer.y);
EINA_LIST_FOREACH(ins, l, obj)
{
- ev.canvas.x = e->pointer.x;
- ev.canvas.y = e->pointer.y;
- _evas_event_havemap_adjust(obj, &ev.canvas.x, &ev.canvas.y, obj->mouse_grabbed);
- if (!eina_list_data_find(e->pointer.object.in, obj))
+ if (_evas_object_event_visible_check(obj))
{
- if (!obj->mouse_in)
+ ev.canvas.x = e->pointer.x;
+ ev.canvas.y = e->pointer.y;
+ _evas_event_havemap_adjust(obj, &ev.canvas.x, &ev.canvas.y, obj->mouse_grabbed);
+ if (!eina_list_data_find(e->pointer.object.in, obj))
{
- obj->mouse_in = 1;
- if (e->events_frozen <= 0)
- evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_IN, &ev);
+ if (!obj->mouse_in)
+ {
+ obj->mouse_in = 1;
+ if (e->events_frozen <= 0)
+ evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_IN, &ev);
+ }
}
}
if (e->delete_me) break;
copy = evas_event_list_copy(e->pointer.object.in);
EINA_LIST_FOREACH(copy, l, obj)
{
- ev.canvas.x = x;
- ev.canvas.y = y;
- ev.canvas.xsub = fx;
- ev.canvas.ysub = fy;
- _evas_event_havemap_adjust(obj, &ev.canvas.x, &ev.canvas.y, obj->mouse_grabbed);
- if (x != ev.canvas.x)
- ev.canvas.xsub = ev.canvas.x; // fixme - lost precision
- if (y != ev.canvas.y)
- ev.canvas.ysub = ev.canvas.y; // fixme - lost precision
- if (obj->pointer_mode != EVAS_OBJECT_POINTER_MODE_NOGRAB)
+ if (_evas_object_event_valid_check(obj))
{
- obj->mouse_grabbed++;
- e->pointer.mouse_grabbed++;
+ ev.canvas.x = x;
+ ev.canvas.y = y;
+ ev.canvas.xsub = fx;
+ ev.canvas.ysub = fy;
+ _evas_event_havemap_adjust(obj, &ev.canvas.x, &ev.canvas.y, obj->mouse_grabbed);
+ if (x != ev.canvas.x)
+ ev.canvas.xsub = ev.canvas.x; // fixme - lost precision
+ if (y != ev.canvas.y)
+ ev.canvas.ysub = ev.canvas.y; // fixme - lost precision
+ if (obj->pointer_mode != EVAS_OBJECT_POINTER_MODE_NOGRAB)
+ {
+ obj->mouse_grabbed++;
+ e->pointer.mouse_grabbed++;
+ }
+ if (e->events_frozen <= 0)
+ evas_object_event_callback_call(obj, EVAS_CALLBACK_MULTI_DOWN, &ev);
}
- if (e->events_frozen <= 0)
- evas_object_event_callback_call(obj, EVAS_CALLBACK_MULTI_DOWN, &ev);
if (e->delete_me) break;
}
if (copy) eina_list_free(copy);
copy = evas_event_list_copy(e->pointer.object.in);
EINA_LIST_FOREACH(copy, l, obj)
{
- ev.canvas.x = x;
- ev.canvas.y = y;
- ev.canvas.xsub = fx;
- ev.canvas.ysub = fy;
- _evas_event_havemap_adjust(obj, &ev.canvas.x, &ev.canvas.y, obj->mouse_grabbed);
- if (x != ev.canvas.x)
- ev.canvas.xsub = ev.canvas.x; // fixme - lost precision
- if (y != ev.canvas.y)
- ev.canvas.ysub = ev.canvas.y; // fixme - lost precision
- if ((obj->pointer_mode != EVAS_OBJECT_POINTER_MODE_NOGRAB) &&
- (obj->mouse_grabbed > 0))
+ if (_evas_object_event_valid_check(obj))
{
- obj->mouse_grabbed--;
- e->pointer.mouse_grabbed--;
+ ev.canvas.x = x;
+ ev.canvas.y = y;
+ ev.canvas.xsub = fx;
+ ev.canvas.ysub = fy;
+ _evas_event_havemap_adjust(obj, &ev.canvas.x, &ev.canvas.y, obj->mouse_grabbed);
+ if (x != ev.canvas.x)
+ ev.canvas.xsub = ev.canvas.x; // fixme - lost precision
+ if (y != ev.canvas.y)
+ ev.canvas.ysub = ev.canvas.y; // fixme - lost precision
+ if ((obj->pointer_mode != EVAS_OBJECT_POINTER_MODE_NOGRAB) &&
+ (obj->mouse_grabbed > 0))
+ {
+ obj->mouse_grabbed--;
+ e->pointer.mouse_grabbed--;
+ }
+ if (e->events_frozen <= 0)
+ evas_object_event_callback_call(obj, EVAS_CALLBACK_MULTI_UP, &ev);
}
- if (e->events_frozen <= 0)
- evas_object_event_callback_call(obj, EVAS_CALLBACK_MULTI_UP, &ev);
if (e->delete_me) break;
}
if (copy) copy = eina_list_free(copy);
copy = evas_event_list_copy(e->pointer.object.in);
EINA_LIST_FOREACH(copy, l, obj)
{
- if ((obj->cur.visible) &&
- (evas_object_clippers_is_visible(obj)) &&
- (!evas_event_passes_through(obj)) &&
- (!obj->clip.clipees))
+ if (_evas_object_event_valid_check(obj))
{
ev.cur.canvas.x = x;
ev.cur.canvas.y = y;