Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGermano Cavalcante <mano-wii>2022-08-18 15:32:49 +0300
committerGermano Cavalcante <germano.costa@ig.com.br>2022-08-19 16:09:58 +0300
commite4f1d719080ab15f4a33034a1eccacace4600b04 (patch)
treeb9de73d0bc6c7fe25e69b0bc4b90dbb5148de737 /source/blender/blenkernel/intern/curves_geometry.cc
parentd94aadf2357246bc93f38b8cf021a9e6cc64ed43 (diff)
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. https://github.com/libsdl-org/SDL/blob/f317d619ccd22e60cebf1b09d716d3985359c981/src/video/windows/SDL_windowsmouse.c#L255) Maniphest Tasks: T89399 Differential Revision: https://developer.blender.org/D15707
Diffstat (limited to 'source/blender/blenkernel/intern/curves_geometry.cc')
0 files changed, 0 insertions, 0 deletions