Found it! :D
With a lot of guidance from you, Jens, I have the bug pegged!
Ready?
Code goes in...
void wxScintilla::OnMouseWheel (wxMouseEvent& evt)
{
// prevent having an event queue with wheel events that cannot be processed
// reasonably fast (see ticket #9057)
printf( "OnMouseWheel\n" );
printf( "Checking %d <= %d\n", m_lastWheelTimestamp, evt.GetTimestamp() );
if ( m_lastWheelTimestamp <= evt.GetTimestamp() )
{
printf( "OnMouseWheel - Processed\n" );
m_lastWheelTimestamp = m_stopWatch.Time();
m_swx->DoMouseWheel(evt.GetWheelRotation(),
evt.GetWheelDelta(),
evt.GetLinesPerAction(),
evt.ControlDown(),
evt.IsPageScroll());
m_lastWheelTimestamp = m_stopWatch.Time() - m_lastWheelTimestamp;
m_lastWheelTimestamp += evt.GetTimestamp();
}
}
Text comes out...
OnMouseWheel
Checking 0 <= -521831849
OnMouseWheel
Checking 0 <= -521826089
OnMouseWheel
Checking 0 <= -521824121
You can see that the timer is incrementing...it's just negative.
Now here's a quote from http://docs.wxwidgets.org/trunk/classwx_event.html (http://docs.wxwidgets.org/trunk/classwx_event.html) on that function (emphasis mine):
long wxEvent::GetTimestamp() const
Gets the timestamp for the event.
The timestamp is the time in milliseconds since some fixed moment (not necessarily the standard Unix Epoch, so only differences between the timestamps and not their absolute values usually make sense).
So, the bug's in wxScintilla. And sure enough, if I initialize m_lastWheelTimestamp to std::numeric_limits<long>::min() instead of the absolute 0 everything works again.