Corrected empty check of OsEventQueue in WindowsDevice.process_events