Godot Version
3.5.3, 3.6.1, 4.4.1
Situation / Background
There seems to be a bug in Godot’s iOS implementation in all versions mentioned in combination with certain iOS versions (e.g. 15.8). (I will report this as a bug once I’m sure what’s happening exactly.)
(Everything works fine on Windows, Android and “most” iOS versions.)
When switching from my app (reproducible with any freshly created blank app) to any other app or the iOS desktop and back to the app, with a certain chance (1:2 - 1:5) the app gets focus, but immediately loses it again, but stays active/visible.
Important: Even though the app does NOT have focus and does NOT react in any way, all screen touches are being queued. Once I switch out of the app AGAIN and back to it again, all queued events are being sent at once causing all kinds of problems (e.g. a click which normally leads to a screen transition and can be called only once is being called multiple times).
This seems to happen in all kinds of Nodes, both using _input and _gui_input.
Question
To prevent this “event flooding” I wanted to clear the input queue/buffer once the app gets focus (e.g. when getting NOTIFICATION_WM_FOCUS_IN or NOTIFICATION_APP_RESUMED), but to my surprise couldn’t find a “clear event queue” function or something similar.
So, is this possible at all and if so, how?
Thanks a lot, any help appreciated!