ReaderUI: Properly neuter gesture handling from InputContainer modules

None[1] of them actually rely on their own onGesture handler, they
all register their own stuff to ReaderUI's.
Hotfix #9710 revealed that the way this was handled didn't exactly
work as expected ;).

The only thing that consumes ges_events is InputContainer's onGesture
method. All these modules *extend* InputContainer, but none of them
*implement* a custom onGesture, so self.onGesture = nil was just a NOP,
they always access InputContainer's method via inheritance.
If we actively want to neuter it, we *have* to implement it in that
module (with a NOP).

[1] The exception being ReaderZooming, but that only when in flip mode.
This commit is contained in:
NiLuJe
2022-10-30 23:05:04 +01:00
parent 71cad1e49c
commit 1e24a1c7a3
11 changed files with 52 additions and 13 deletions

View File

@@ -148,8 +148,13 @@ function ReaderRolling:init()
end)
self.ui.menu:registerToMainMenu(self)
self.batched_update_count = 0
-- delegate gesture listener to readerui, NOP our own
self.ges_events = nil
end
function ReaderRolling:onGesture() end
function ReaderRolling:onReadSettings(config)
-- 20180503: some fix in crengine has changed the way the DOM is built
-- for HTML documents and may make XPATHs obtained from previous version
@@ -331,9 +336,6 @@ function ReaderRolling:onReaderReady()
end
function ReaderRolling:setupTouchZones()
-- delegate gesture listener to readerui
self.ges_events = {}
self.onGesture = nil
if not Device:isTouchDevice() then return end
local forward_zone, backward_zone = self.view:getTapZones()