made Window's processEvents() blocking for backwards compatibility