diff --git a/frontend/device/gesturedetector.lua b/frontend/device/gesturedetector.lua index d94461e45..25e51d792 100644 --- a/frontend/device/gesturedetector.lua +++ b/frontend/device/gesturedetector.lua @@ -347,7 +347,7 @@ function GestureDetector:probeClockSource(timev) -- clock-threshold <= timev <= clock+threshold if timev >= realtime - threshold and timev <= realtime + threshold then self.clock_id = C.CLOCK_REALTIME - logger.info("GestureDetector:probeClockSource: Touch event timestamps appear to use CLOCK_REALTIME") + logger.dbg("GestureDetector:probeClockSource: Touch event timestamps appear to use CLOCK_REALTIME") return end @@ -355,7 +355,7 @@ function GestureDetector:probeClockSource(timev) local monotonic = time.monotonic_coarse() if timev >= monotonic - threshold and timev <= monotonic + threshold then self.clock_id = C.CLOCK_MONOTONIC - logger.info("GestureDetector:probeClockSource: Touch event timestamps appear to use CLOCK_MONOTONIC") + logger.dbg("GestureDetector:probeClockSource: Touch event timestamps appear to use CLOCK_MONOTONIC") return end @@ -364,13 +364,13 @@ function GestureDetector:probeClockSource(timev) -- NOTE: It was implemented in Linux 2.6.39, so, reject 0, which would mean it's unsupported... if not boottime == 0 and timev >= boottime - threshold and timev <= boottime + threshold then self.clock_id = C.CLOCK_BOOTTIME - logger.info("GestureDetector:probeClockSource: Touch event timestamps appear to use CLOCK_BOOTTIME") + logger.dbg("GestureDetector:probeClockSource: Touch event timestamps appear to use CLOCK_BOOTTIME") return end -- If we're here, the detection was inconclusive :/ self.clock_id = -1 - logger.info("GestureDetector:probeClockSource: Touch event clock source detection was inconclusive") + logger.dbg("GestureDetector:probeClockSource: Touch event clock source detection was inconclusive") -- Print all all the gory details in debug mode when this happens... logger.dbg("Input frame :", time.format_time(timev)) logger.dbg("CLOCK_REALTIME :", time.format_time(realtime)) diff --git a/frontend/device/input.lua b/frontend/device/input.lua index 83fc3e31e..1270c7175 100644 --- a/frontend/device/input.lua +++ b/frontend/device/input.lua @@ -1310,6 +1310,9 @@ function Input:inhibitInput(toggle) self._generic_ev_handler = self.handleGenericEv self.handleGenericEv = self.voidEv end + + -- Reset gesture detection state to a blank slate, to avoid bogus gesture detection on restore. + self:resetState() else -- Restore event handlers, if any if self._key_ev_handler then diff --git a/frontend/ui/uimanager.lua b/frontend/ui/uimanager.lua index 7f911cefb..dbe617835 100644 --- a/frontend/ui/uimanager.lua +++ b/frontend/ui/uimanager.lua @@ -1743,9 +1743,6 @@ function UIManager:_beforeSuspend() -- Disable key repeat to avoid useless chatter (especially where Sleep Covers are concerned...) Device:disableKeyRepeat() - - -- Reset gesture detection state to a blank slate (anything power-management related emits KEY events, which don't need gesture detection). - Input:resetState() end -- The common operations that should be performed after resuming the device.