Pump events whenever we finish drawing a frame

This prevents the OS from thinking we've stopped responding.