mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
Input: Leave EV_SDL mostly alone in inhibitInput (#10430)
It's mostly not used for actual input, but sideband stuff that we don't want to miss. Fix #10427
This commit is contained in:
@@ -1403,7 +1403,16 @@ function Input:inhibitInput(toggle)
|
||||
end
|
||||
if not self._sdl_ev_handler then
|
||||
self._sdl_ev_handler = self.handleSdlEv
|
||||
self.handleSdlEv = self.voidEv
|
||||
-- This is mainly used for non-input events, so we mostly want to leave it alone (#10427).
|
||||
-- The only exception being mwheel handling, which we *do* want to inhibit.
|
||||
self.handleSdlEv = function(this, ev)
|
||||
local SDL_MOUSEWHEEL = 1027
|
||||
if ev.code == SDL_MOUSEWHEEL then
|
||||
return
|
||||
else
|
||||
return this:_sdl_ev_handler(ev)
|
||||
end
|
||||
end
|
||||
end
|
||||
if not self._generic_ev_handler then
|
||||
self._generic_ev_handler = self.handleGenericEv
|
||||
|
||||
Reference in New Issue
Block a user