Detect when we open the iOS Control or Notification Center |
Detect when we open the iOS Control or Notification Center |
Alex Szpakowski
Guest
|
SDL’s code sends a SDL_FINGERUP event when iOS ‘cancels’ a touch press, which is what should happen when the Control Center or Today View menus are opened. It works as expected on my phone, at least.
What versions of SDL and iOS are you using?
|
|||||||||||||
|
Noxalus
|
Hello Alex and thank you for your answer.
I'm currently using SDL 2.0.3 and tested it on iOS 8.4.1, and you are right, SDL properly triggers a SDL_FINGERUP when we open the Control or Notification center. My tests were wrong because I used a web view on top of my SDL canvas. When we open these menus, a JS touchend event should be fired and transmitted to the SDL canvas. So, actually, this issue doesn't concern SDL, I'm sorry. Thank you for your help anyway! |
|||||||||||
|
Noxalus
|
I'm come back because I think this problem can't be resolved using JS.
The idea that I had was to add an event listener on JS event triggered when the window loses the focus ('blur' event and 'focus' for the opposite). Unfortunatly, these events are not fired when we open the Control Center like I expected. But if SDL can detect that to trigger an SDL_FINGERUP event, it should also fire a SDL_WindowEvent like SDL_WINDOWEVENT_FOCUS_LOST. And this is what SDL do, so there is no problem, everything is good. |
|||||||||||
|