An easy fix would be a speed threshold. Studies show that most movements to targets involve a high speed phase and then a deceleration phase near the target (example from the original Fitts law studies if you read up on that). So simply set a threshold for movement speed. If the mouse is moving faster than X, don't use sticky controls. Once the speed drops below X, turn on sticky controls.