Get loading dialog displaying on Linux

Call ProcessEvents up to 5 times, assuming there are more events in the
queue. It's a bit of a hack.