forked from enlightenment/enlightenment
block recursive mouse eventing in bryce action handlers
ensure that only the outermost event adds a post callback to avoid triggering actions multiple times
This commit is contained in:
parent
ccd374e6a2
commit
49e2a31cfc
|
@ -609,6 +609,7 @@ _bryce_mouse_down(void *data, Evas *e, Evas_Object *obj EINA_UNUSED, void *event
|
||||||
{
|
{
|
||||||
Bryce *b = data;
|
Bryce *b = data;
|
||||||
|
|
||||||
|
if (b->event_info == event_info) return;
|
||||||
b->event_info = event_info;
|
b->event_info = event_info;
|
||||||
evas_post_event_callback_push(e, _bryce_mouse_down_post, b);
|
evas_post_event_callback_push(e, _bryce_mouse_down_post, b);
|
||||||
}
|
}
|
||||||
|
@ -630,6 +631,7 @@ _bryce_mouse_up(void *data, Evas *e, Evas_Object *obj EINA_UNUSED, void *event_i
|
||||||
{
|
{
|
||||||
Bryce *b = data;
|
Bryce *b = data;
|
||||||
|
|
||||||
|
if (b->event_info == event_info) return;
|
||||||
b->event_info = event_info;
|
b->event_info = event_info;
|
||||||
evas_post_event_callback_push(e, _bryce_mouse_up_post, b);
|
evas_post_event_callback_push(e, _bryce_mouse_up_post, b);
|
||||||
}
|
}
|
||||||
|
@ -651,6 +653,7 @@ _bryce_mouse_wheel(void *data, Evas *e, Evas_Object *obj EINA_UNUSED, void *even
|
||||||
{
|
{
|
||||||
Bryce *b = data;
|
Bryce *b = data;
|
||||||
|
|
||||||
|
if (b->event_info == event_info) return;
|
||||||
b->event_info = event_info;
|
b->event_info = event_info;
|
||||||
evas_post_event_callback_push(e, _bryce_mouse_wheel_post, b);
|
evas_post_event_callback_push(e, _bryce_mouse_wheel_post, b);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue