add feature to help fix bug in ecore-evas

SVN revision: 66567
This commit is contained in:
Carsten Haitzler 2011-12-27 12:01:17 +00:00
parent 411b2b8676
commit d832fca15c
3 changed files with 29 additions and 2 deletions

View File

@ -590,3 +590,9 @@
2011-12-26 Christopher Michael (devilhorns) 2011-12-26 Christopher Michael (devilhorns)
* Add functions to get/set if an object is a 'frame_object' * Add functions to get/set if an object is a 'frame_object'
2011-12-27 Carsten Haitzler (The Rasterman)
* Add feature to get number of pressed devices (help fix
ecore-evas bug).

View File

@ -2510,6 +2510,16 @@ EAPI void evas_event_thaw_eval (Evas *e) EINA_ARG_NONN
* @{ * @{
*/ */
/**
* Get the number of mouse or multi presses currently active
*
* @p e The given canvas pointer.
* @return The numer of presses (0 if none active).
*
* @since 1.2
*/
EAPI int evas_event_down_count_get (const Evas *e) EINA_ARG_NONNULL(1);
/** /**
* Mouse down event feed. * Mouse down event feed.
* *

View File

@ -909,7 +909,7 @@ evas_event_feed_mouse_out(Evas *e, unsigned int timestamp, const void *data)
_evas_walk(e); _evas_walk(e);
/* if our mouse button is grabbed to any objects */ /* if our mouse button is grabbed to any objects */
if (e->pointer.mouse_grabbed == 0) if ((0) && (e->pointer.mouse_grabbed != 0))
{ {
/* go thru old list of in objects */ /* go thru old list of in objects */
Eina_List *l, *copy; Eina_List *l, *copy;
@ -929,12 +929,14 @@ evas_event_feed_mouse_out(Evas *e, unsigned int timestamp, const void *data)
if (e->events_frozen <= 0) if (e->events_frozen <= 0)
evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_OUT, &ev, event_id); evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_OUT, &ev, event_id);
} }
obj->mouse_grabbed = 0;
} }
if (e->delete_me) break; if (e->delete_me) break;
} }
if (copy) copy = eina_list_free(copy); if (copy) copy = eina_list_free(copy);
/* free our old list of ins */ /* free our old list of ins */
e->pointer.object.in = eina_list_free(e->pointer.object.in); e->pointer.object.in = eina_list_free(e->pointer.object.in);
e->pointer.mouse_grabbed = 0;
_evas_post_event_callback_call(e); _evas_post_event_callback_call(e);
} }
_evas_unwalk(e); _evas_unwalk(e);
@ -1115,7 +1117,7 @@ evas_event_feed_multi_move(Evas *e,
if (e->events_frozen > 0) return; if (e->events_frozen > 0) return;
e->last_timestamp = timestamp; e->last_timestamp = timestamp;
if (!e->pointer.inside) return; if ((!e->pointer.inside) && (e->pointer.mouse_grabbed == 0)) return;
_evas_walk(e); _evas_walk(e);
/* update moved touch point */ /* update moved touch point */
@ -1674,3 +1676,12 @@ evas_event_refeed_event(Evas *e, void *event_copy, Evas_Callback_Type event_type
break; break;
} }
} }
EAPI int
evas_event_down_count_get(const Evas *e)
{
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
return 0;
MAGIC_CHECK_END();
return e->pointer.downs;
}