Fix rentrant focus procedure on windows