From 4c5d1caa920f848aaa14e6674481548ae4d82ed7 Mon Sep 17 00:00:00 2001 From: chrox Date: Thu, 26 Dec 2013 22:32:34 +0800 Subject: [PATCH] detect touch event for more responsive UI --- frontend/ui/gesturedetector.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/frontend/ui/gesturedetector.lua b/frontend/ui/gesturedetector.lua index e35e658dc..007958d08 100644 --- a/frontend/ui/gesturedetector.lua +++ b/frontend/ui/gesturedetector.lua @@ -350,6 +350,16 @@ function GestureDetector:handleNonTap(tev) return self:switchState("holdState", tev, true) end end, deadline) + DEBUG("handle non-tap", tev) + return { + ges = "touch", + pos = Geom:new{ + x = tev.x, + y = tev.y, + w = 0, h = 0, + }, + time = tev.timev, + } else -- it is not end of touch event, see if we need to switch to -- other states