Fixed vsync issue on linux and potentially other platforms by processing all new events before drawing, rather than only one per iteration.