bdk-blender/intern/ghost
Germano Cavalcante 29bc410c8a Fix T89399: Mouse wrapping causes erratic movement
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. f317d619cc/src/video/windows/SDL_windowsmouse.c (L255))

Maniphest Tasks: T89399

Differential Revision: https://developer.blender.org/D15707
2022-11-28 14:31:02 +01:00
..
intern Fix T89399: Mouse wrapping causes erratic movement 2022-11-28 14:31:02 +01:00
test WM: Remove ASCII members from wmEvent & GHOST_TEventKeyData 2022-07-14 15:59:19 +10:00
CMakeLists.txt GHOST/Wayland: add logging for listener handlers 2022-07-08 19:40:10 +10:00
GHOST_C-api.h UI: add preference to disable touchpad multitouch gestures 2022-09-26 23:04:41 +02:00
GHOST_IContext.h File headers: SPDX License migration 2022-02-11 09:14:36 +11:00
GHOST_IEvent.h File headers: SPDX License migration 2022-02-11 09:14:36 +11:00
GHOST_IEventConsumer.h File headers: SPDX License migration 2022-02-11 09:14:36 +11:00
GHOST_ISystem.h UI: add preference to disable touchpad multitouch gestures 2022-09-26 23:04:41 +02:00
GHOST_ISystemPaths.h File headers: SPDX License migration 2022-02-11 09:14:36 +11:00
GHOST_ITimerTask.h File headers: SPDX License migration 2022-02-11 09:14:36 +11:00
GHOST_IWindow.h GHOST/Wayland: support displaying custom software cursors 2022-06-18 17:16:42 +10:00
GHOST_IXrContext.h File headers: SPDX License migration 2022-02-11 09:14:36 +11:00
GHOST_Path-api.h File headers: SPDX License migration 2022-02-11 09:14:36 +11:00
GHOST_Rect.h Cleanup: rename misleading/inconsistent GHOST types 2022-06-27 20:36:40 +10:00
GHOST_Types.h Cleanup: update & correct comments for event handling 2022-07-14 16:10:13 +10:00