Support window focus change