Notification: NOP conflicting event handlers from our base class (#10471)

Notification is a toast, so it doesn't stop event popagation.
If we don't disable thoses handlers inside Notification, we get spurious
duplicate handlers being fired ;).

Fix #10461
reviewable/pr10478/r1
NiLuJe 12 months ago committed by GitHub
parent 6c0bfb1c0a
commit 17d5934712
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -323,9 +323,9 @@ function InputContainer:onIgnoreTouchInput(toggle)
else
-- Toggle the current state
if InputContainer._onGesture then
self:onIgnoreTouchInput(false)
return self:onIgnoreTouchInput(false)
else
self:onIgnoreTouchInput(true)
return self:onIgnoreTouchInput(true)
end
end

@ -251,4 +251,13 @@ function Notification:onGesture(ev)
return InputContainer.onGesture(self, ev)
end
-- Since toasts do *not* prevent event propagation, if we let this go through to InputContainer, shit happens...
function Notification:onIgnoreTouchInput(toggle)
return true
end
-- Do the same for other Events caught by our base class
Notification.onResume = Notification.onIgnoreTouchInput
Notification.onPhysicalKeyboardDisconnected = Notification.onIgnoreTouchInput
Notification.onInput = Notification.onIgnoreTouchInput
return Notification

Loading…
Cancel
Save