forked from enlightenment/efl
ecore_input_evas: Enable cancel events by default
After my input event changes, the propagation path has been altered from: ecore_x -> evas_event to: ecore_x -> ecore_input_evas -> evas_event But ecore_input_evas was ignoring cancel events by default. There should be no good reason to disable cancel events anymore, according to @jypark. Also, this fixes an actual bug :) Fixes T4301
This commit is contained in:
parent
d6817f4d6e
commit
ac0dd31075
|
@ -63,8 +63,6 @@ static Eina_Hash *_window_hash = NULL;
|
||||||
static Eina_List *_last_events = NULL;
|
static Eina_List *_last_events = NULL;
|
||||||
static double _last_events_timeout = 0.5;
|
static double _last_events_timeout = 0.5;
|
||||||
static Eina_Bool _last_events_enable = EINA_FALSE;
|
static Eina_Bool _last_events_enable = EINA_FALSE;
|
||||||
static Eina_Bool _cancel_events_enable = EINA_FALSE;
|
|
||||||
|
|
||||||
|
|
||||||
static Eina_Bool _ecore_event_evas_mouse_button(Ecore_Event_Mouse_Button *e,
|
static Eina_Bool _ecore_event_evas_mouse_button(Ecore_Event_Mouse_Button *e,
|
||||||
Ecore_Event_Press press,
|
Ecore_Event_Press press,
|
||||||
|
@ -490,8 +488,6 @@ _ecore_event_evas_mouse_button(Ecore_Event_Mouse_Button *e, Ecore_Event_Press pr
|
||||||
//error handle
|
//error handle
|
||||||
// 1. ecore up without ecore down
|
// 1. ecore up without ecore down
|
||||||
// 2. ecore cancel without ecore down
|
// 2. ecore cancel without ecore down
|
||||||
if (_cancel_events_enable)
|
|
||||||
{
|
|
||||||
if (press != ECORE_DOWN)
|
if (press != ECORE_DOWN)
|
||||||
{
|
{
|
||||||
//ECORE_UP or ECORE_CANCEL
|
//ECORE_UP or ECORE_CANCEL
|
||||||
|
@ -518,7 +514,6 @@ _ecore_event_evas_mouse_button(Ecore_Event_Mouse_Button *e, Ecore_Event_Press pr
|
||||||
/* This ButtonEvent is worng */
|
/* This ButtonEvent is worng */
|
||||||
if (!ret) return ECORE_CALLBACK_PASS_ON;
|
if (!ret) return ECORE_CALLBACK_PASS_ON;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (e->multi.device == 0)
|
if (e->multi.device == 0)
|
||||||
{
|
{
|
||||||
|
@ -651,8 +646,6 @@ ecore_event_evas_mouse_button_up(void *data EINA_UNUSED, int type EINA_UNUSED, v
|
||||||
EAPI Eina_Bool
|
EAPI Eina_Bool
|
||||||
ecore_event_evas_mouse_button_cancel(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
|
ecore_event_evas_mouse_button_cancel(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
|
||||||
{
|
{
|
||||||
if (!_cancel_events_enable) return EINA_FALSE;
|
|
||||||
|
|
||||||
return _ecore_event_evas_mouse_button_cancel((Ecore_Event_Mouse_Button *)event);
|
return _ecore_event_evas_mouse_button_cancel((Ecore_Event_Mouse_Button *)event);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -818,10 +811,6 @@ ecore_event_evas_init(void)
|
||||||
if (tmp)
|
if (tmp)
|
||||||
_last_events_timeout = ((double) atoi(tmp)) / 60;
|
_last_events_timeout = ((double) atoi(tmp)) / 60;
|
||||||
}
|
}
|
||||||
if (getenv("ECORE_INPUT_CANCEL"))
|
|
||||||
{
|
|
||||||
_cancel_events_enable = EINA_TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
return _ecore_event_evas_init_count;
|
return _ecore_event_evas_init_count;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue