From fdea39c2d6d5374bce3f66b6caf19ad145d6557c Mon Sep 17 00:00:00 2001 From: NiLuJe Date: Sat, 13 May 2023 20:43:23 +0200 Subject: [PATCH] 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 --- frontend/device/input.lua | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/frontend/device/input.lua b/frontend/device/input.lua index 6079a4c93..9698917a9 100644 --- a/frontend/device/input.lua +++ b/frontend/device/input.lua @@ -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