fix(color): touch release event incorrectly sent to Lua scripts after key presses (#6032)
This commit is contained in:
@@ -120,12 +120,6 @@ void LuaEventHandler::event_cb(lv_event_t* e)
|
||||
downTime = RTOS_GET_MS();
|
||||
}
|
||||
} else if (code == LV_EVENT_RELEASED) {
|
||||
LuaEventData* const es = luaGetEventSlot();
|
||||
if (es) {
|
||||
es->event = EVT_TOUCH_BREAK;
|
||||
TRACE("EVT_TOUCH_BREAK");
|
||||
}
|
||||
|
||||
// tap count handling
|
||||
uint32_t now = RTOS_GET_MS();
|
||||
if (now - downTime <= LUA_TAP_TIME) {
|
||||
@@ -138,6 +132,13 @@ void LuaEventHandler::event_cb(lv_event_t* e)
|
||||
} else {
|
||||
tapCount = 0;
|
||||
}
|
||||
|
||||
LuaEventData* const es = luaGetEventSlot();
|
||||
if (es && downTime) {
|
||||
downTime = 0;
|
||||
es->event = EVT_TOUCH_BREAK;
|
||||
TRACE("EVT_TOUCH_BREAK");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user