Fix corner case for Kobo Aura: tev.id == -1 with tev.x and tev.y values defined.

pull/443/head
Giorgio Micotti 11 years ago
parent cde3e1d184
commit 172241bc8e

@ -209,20 +209,20 @@ end
function GestureDetector:initialState(tev)
local slot = tev.slot
if tev.id then
-- a event ends
-- an event ends
if tev.id == -1 then
self.detectings[slot] = false
else
self.track_ids[slot] = tev.id
end
end
if tev.x and tev.y then
-- user starts a new touch motion
if not self.detectings[slot] then
self.detectings[slot] = true
self.first_tevs[slot] = self:deepCopyEv(tev)
-- default to tap state
return self:switchState("tapState", tev)
if tev.x and tev.y then
-- user starts a new touch motion
if not self.detectings[slot] then
self.detectings[slot] = true
self.first_tevs[slot] = self:deepCopyEv(tev)
-- default to tap state
return self:switchState("tapState", tev)
end
end
end
end
end

Loading…
Cancel
Save