Don't record an event with incorrect timestamp

This commit is contained in:
Daniel Zaoui 2016-03-23 11:41:53 +02:00
parent 1a35f7e8ba
commit b5900b27af
1 changed files with 14 additions and 0 deletions

View File

@ -707,6 +707,7 @@ tsuite_event_type_get(Evas_Callback_Type t)
EAPI void EAPI void
evas_event_feed_mouse_in(Evas *e, unsigned int timestamp, const void *data) evas_event_feed_mouse_in(Evas *e, unsigned int timestamp, const void *data)
{ {
if (!timestamp) return;
#ifdef DEBUG_TSUITE #ifdef DEBUG_TSUITE
printf("Calling %s timestamp=<%u>\n", __func__, timestamp); printf("Calling %s timestamp=<%u>\n", __func__, timestamp);
#endif #endif
@ -724,6 +725,7 @@ evas_event_feed_mouse_in(Evas *e, unsigned int timestamp, const void *data)
EAPI void EAPI void
evas_event_feed_mouse_out(Evas *e, unsigned int timestamp, const void *data) evas_event_feed_mouse_out(Evas *e, unsigned int timestamp, const void *data)
{ {
if (!timestamp) return;
#ifdef DEBUG_TSUITE #ifdef DEBUG_TSUITE
printf("Calling %s timestamp=<%u>\n", __func__, timestamp); printf("Calling %s timestamp=<%u>\n", __func__, timestamp);
#endif #endif
@ -742,6 +744,7 @@ EAPI void
evas_event_feed_mouse_down(Evas *e, int b, Evas_Button_Flags flags, evas_event_feed_mouse_down(Evas *e, int b, Evas_Button_Flags flags,
unsigned int timestamp, const void *data) unsigned int timestamp, const void *data)
{ {
if (!timestamp) return;
#ifdef DEBUG_TSUITE #ifdef DEBUG_TSUITE
printf("Calling %s timestamp=<%u>\n", __func__, timestamp); printf("Calling %s timestamp=<%u>\n", __func__, timestamp);
#endif #endif
@ -761,6 +764,7 @@ EAPI void
evas_event_feed_mouse_up(Evas *e, int b, Evas_Button_Flags flags, evas_event_feed_mouse_up(Evas *e, int b, Evas_Button_Flags flags,
unsigned int timestamp, const void *data) unsigned int timestamp, const void *data)
{ {
if (!timestamp) return;
#ifdef DEBUG_TSUITE #ifdef DEBUG_TSUITE
printf("Calling %s timestamp=<%u>\n", __func__, timestamp); printf("Calling %s timestamp=<%u>\n", __func__, timestamp);
#endif #endif
@ -780,6 +784,7 @@ EAPI void
evas_event_feed_mouse_move(Evas *e, int x, int y, unsigned int timestamp, evas_event_feed_mouse_move(Evas *e, int x, int y, unsigned int timestamp,
const void *data) const void *data)
{ {
if (!timestamp) return;
mouse_move t = { x, y, timestamp, evas_list_find(e) }; mouse_move t = { x, y, timestamp, evas_list_find(e) };
#ifdef DEBUG_TSUITE #ifdef DEBUG_TSUITE
printf("Calling %s timestamp=<%u>\n", __func__, timestamp); printf("Calling %s timestamp=<%u>\n", __func__, timestamp);
@ -798,6 +803,7 @@ EAPI void
evas_event_input_mouse_move(Evas *e, int x, int y, unsigned int timestamp, evas_event_input_mouse_move(Evas *e, int x, int y, unsigned int timestamp,
const void *data) const void *data)
{ {
if (!timestamp) return;
mouse_move t = { x, y, timestamp, evas_list_find(e) }; mouse_move t = { x, y, timestamp, evas_list_find(e) };
#ifdef DEBUG_TSUITE #ifdef DEBUG_TSUITE
printf("Calling %s timestamp=<%u>\n", __func__, timestamp); printf("Calling %s timestamp=<%u>\n", __func__, timestamp);
@ -815,6 +821,7 @@ EAPI void
evas_event_feed_mouse_wheel(Evas *e, int direction, int z, evas_event_feed_mouse_wheel(Evas *e, int direction, int z,
unsigned int timestamp, const void *data) unsigned int timestamp, const void *data)
{ {
if (!timestamp) return;
#ifdef DEBUG_TSUITE #ifdef DEBUG_TSUITE
printf("Calling %s timestamp=<%u>\n", __func__, timestamp); printf("Calling %s timestamp=<%u>\n", __func__, timestamp);
#endif #endif
@ -835,6 +842,7 @@ evas_event_feed_multi_down(Evas *e, int d, int x, int y,
double fx, double fy, Evas_Button_Flags flags, double fx, double fy, Evas_Button_Flags flags,
unsigned int timestamp, const void *data) unsigned int timestamp, const void *data)
{ {
if (!timestamp) return;
#ifdef DEBUG_TSUITE #ifdef DEBUG_TSUITE
printf("Calling %s timestamp=<%u>\n", __func__, timestamp); printf("Calling %s timestamp=<%u>\n", __func__, timestamp);
#endif #endif
@ -859,6 +867,7 @@ evas_event_feed_multi_up(Evas *e, int d, int x, int y,
double fx, double fy, Evas_Button_Flags flags, double fx, double fy, Evas_Button_Flags flags,
unsigned int timestamp, const void *data) unsigned int timestamp, const void *data)
{ {
if (!timestamp) return;
#ifdef DEBUG_TSUITE #ifdef DEBUG_TSUITE
printf("Calling %s timestamp=<%u>\n", __func__, timestamp); printf("Calling %s timestamp=<%u>\n", __func__, timestamp);
#endif #endif
@ -881,6 +890,7 @@ evas_event_feed_multi_move(Evas *e, int d, int x, int y, double rad,
double radx, double rady, double pres, double ang, double radx, double rady, double pres, double ang,
double fx, double fy, unsigned int timestamp, const void *data) double fx, double fy, unsigned int timestamp, const void *data)
{ {
if (!timestamp) return;
#ifdef DEBUG_TSUITE #ifdef DEBUG_TSUITE
printf("Calling %s timestamp=<%u>\n", __func__, timestamp); printf("Calling %s timestamp=<%u>\n", __func__, timestamp);
#endif #endif
@ -902,6 +912,7 @@ evas_event_feed_key_down(Evas *e, const char *keyname, const char *key,
const char *string, const char *compose, const char *string, const char *compose,
unsigned int timestamp, const void *data) unsigned int timestamp, const void *data)
{ {
if (!timestamp) return;
int evt = tsuite_event_type_get(EVAS_CALLBACK_KEY_DOWN); int evt = tsuite_event_type_get(EVAS_CALLBACK_KEY_DOWN);
void (*orig) (Evas *e, const char *keyname, const char *key, void (*orig) (Evas *e, const char *keyname, const char *key,
const char *string, const char *compose, const char *string, const char *compose,
@ -957,6 +968,7 @@ evas_event_feed_key_up(Evas *e, const char *keyname, const char *key,
const char *string, const char *compose, const char *string, const char *compose,
unsigned int timestamp, const void *data) unsigned int timestamp, const void *data)
{ {
if (!timestamp) return;
void (*orig) (Evas *e, const char *keyname, const char *key, void (*orig) (Evas *e, const char *keyname, const char *key,
const char *string, const char *compose, const char *string, const char *compose,
unsigned int timestamp, const void *data) = unsigned int timestamp, const void *data) =
@ -1006,6 +1018,7 @@ evas_event_feed_key_down_with_keycode(Evas *e, const char *keyname, const char *
const char *string, const char *compose, const char *string, const char *compose,
unsigned int timestamp, const void *data, unsigned int keycode) unsigned int timestamp, const void *data, unsigned int keycode)
{ {
if (!timestamp) return;
int evt = TSUITE_EVENT_KEY_DOWN_WITH_KEYCODE; int evt = TSUITE_EVENT_KEY_DOWN_WITH_KEYCODE;
void (*orig) (Evas *e, const char *keyname, const char *key, void (*orig) (Evas *e, const char *keyname, const char *key,
const char *string, const char *compose, const char *string, const char *compose,
@ -1062,6 +1075,7 @@ evas_event_feed_key_up_with_keycode(Evas *e, const char *keyname, const char *ke
const char *string, const char *compose, const char *string, const char *compose,
unsigned int timestamp, const void *data, unsigned int keycode) unsigned int timestamp, const void *data, unsigned int keycode)
{ {
if (!timestamp) return;
void (*orig) (Evas *e, const char *keyname, const char *key, void (*orig) (Evas *e, const char *keyname, const char *key,
const char *string, const char *compose, const char *string, const char *compose,
unsigned int timestamp, const void *data, unsigned int keycode) = unsigned int timestamp, const void *data, unsigned int keycode) =