- // Prevent having an event queue with wheel events that cannot be processed
- // reasonably fast (see ticket #9057) by ignoring all of them that happen
- // during the time interval corresponding to the time it took us to handle
- // the last one.
- //
- // Notice the use of TimeInMicro() instead of Time() to avoid overflow in
- // long running programs.
- if ( m_timeToBlockWheelEventsUntil <= m_stopWatch.TimeInMicro() )
- {
- const wxLongLong beforeMouseWheel = m_stopWatch.TimeInMicro();
- m_swx->DoMouseWheel(evt.GetWheelRotation(),
- evt.GetWheelDelta(),
- evt.GetLinesPerAction(),
- evt.ControlDown(),
- evt.IsPageScroll());
- const wxLongLong afterMouseWheel = m_stopWatch.TimeInMicro();
- m_timeToBlockWheelEventsUntil = afterMouseWheel;
- m_timeToBlockWheelEventsUntil += afterMouseWheel - beforeMouseWheel;
- }
+ m_swx->DoMouseWheel(evt.GetWheelRotation(),
+ evt.GetWheelDelta(),
+ evt.GetLinesPerAction(),
+ evt.ControlDown(),
+ evt.IsPageScroll());