Engine not capturing mouse when going fullscreen and back
In master going fullscreen doesn't capture the mouse pointer, one has to click (which may fire unwanted actions)
It was meant to be fixed by !856:
- https://github.com/DaemonEngine/Daemon/pull/856
but we are currently running #922:
- https://github.com/DaemonEngine/Daemon/pull/922
I don't know if it's a regression in that rewrite, or if it's a bug hidden somewhere else in our code, or a bug in libraries like SDL.
We also not capture the mouse when leaving fullscreen.
Reverting b434381ad5517d672a4e60b191ca773ada01719b (Simplify mouse mode handling) doesn't fix the mouse capture when toggling fullscreen.
I assume we have a kind of race condition: toggling fullscreen can be very slow, and the game is not (re)focused yet when we request the mouse pointer.
Fixed by #1146?
Yes