changes to prevent flashing window border when switching games