stop flip when window lose focus