keep alive logic checks for window focus