Only lock the YubiKey when we have window focus.