From 2b13cd7dcb917b7cbc0ca3e06c155f012a9d2f4c Mon Sep 17 00:00:00 2001 From: NiLuJe Date: Mon, 18 Sep 2023 18:54:21 +0200 Subject: [PATCH] Device: Make sure `input_no_key_repeat` survives a suspend/resume cycle (#10904) I somehow assumed the repeat state snapshot used for restore was taken *after* disabling repeat, but obviously not ;o). Fix #10902 --- frontend/device/generic/device.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/frontend/device/generic/device.lua b/frontend/device/generic/device.lua index 46ec65266..ed93dc040 100644 --- a/frontend/device/generic/device.lua +++ b/frontend/device/generic/device.lua @@ -1097,8 +1097,10 @@ end -- The common operations that should be performed after resuming the device. function Device:_afterResume(inhibit) if inhibit ~= false then - -- Restore key repeat - self:restoreKeyRepeat() + -- Restore key repeat if it's not disabled + if G_reader_settings:nilOrFalse("input_no_key_repeat") then + self:restoreKeyRepeat() + end -- Restore full input handling self.input:inhibitInput(false)