forked from blender/blender
29bc410c8a
As mentioned in T89399, "the source of this bug is that cursor wrap
moves the cursor, but when it later checks the mouse position it hasn't
yet been updated, so it re-wraps".
As far as I could see, this happens for two reasons:
1. During the first warp, there are already other mousemove events in the queue with an outdated position.
2. Sometimes Windows occasionally and inexplicably ignores `SetCursorPos()` or `SendInput()` events. (See [1])
The solution consists in checking if the cursor is inside the bounds right after wrapping.
If it's not inside, it indicates that the wrapping either didn't work or the event is out of date.
In these cases do not change the "accum" values.
1.
|
||
---|---|---|
.. | ||
intern | ||
test | ||
CMakeLists.txt | ||
GHOST_C-api.h | ||
GHOST_IContext.h | ||
GHOST_IEvent.h | ||
GHOST_IEventConsumer.h | ||
GHOST_ISystem.h | ||
GHOST_ISystemPaths.h | ||
GHOST_ITimerTask.h | ||
GHOST_IWindow.h | ||
GHOST_IXrContext.h | ||
GHOST_Path-api.h | ||
GHOST_Rect.h | ||
GHOST_Types.h |