Windows: fix 2 bugs in windows_handle_events()