Fix window focus detector