Ticket #9057 (closed defect: fixed)
Fix for using-mouse-wheel-makes-window-scroll-forever
|Reported by:||linmain||Owned by:|
This fix/optimization attacks one common annoying problem among software: When windows take some time to render themself, and the user scrolls the window up or down, the user will think "hey, scroll faster" and scrolls even heavier. Doing that, the user pushes many wheel events onto the event queue, so that after the user found the right position in the document, the window still processes wheel events and scrolls too far, often over 5 seconds longer than wanted (depending on the rendering complexity).
This patch tries to fix it by measuring the time taken to evaluate and process the current mouse wheel event. When the next event arrives before the current event is processed completely (this is seen by their relative timestamps and the time taken to process the current event), then it is ignored.
This patch has considerably improved the responsibility of the mouse wheel for me, especially with styled text. The patch is attached. It is taken against wx version 2.8.7.