Open
Description
Bevy version
0.16.2
What you did
Setting the cursor grab mode to Locked
twice has no effect, as Bevy does not tell winit about this change when the user changes the grab mode to the same value twice.
What went wrong
There are some situations where Bevy thinks the cursor is in one state, but it is in another. A prime example is #8949. So, I want to force winit to try to lock the cursor again. However, Bevy stops me, as it thinks that the cursor is already locked. Instead, I need to first change the lock mode to a placeholder setting to clear the cache, then use the real setting.
The solution is to simply remove the caching.
Additional Information
The offending lines are around
bevy/crates/bevy_winit/src/system.rs
Line 410 in 4da420c