[fix] avoid X11 None macro collision in credential recovery

This commit is contained in:
dijunkun
2026-11-02 03:03:53 +08:00
parent 425698e22e
commit d051dbb278
3 changed files with 4 additions and 4 deletions
@@ -3113,7 +3113,7 @@ void GuiApplication::HandleCredentialRecovery() {
CredentialRecoveryAction action;
{
std::lock_guard<std::mutex> lock(password_change_mutex_);
action = std::exchange(credential_recovery_action_, CredentialRecoveryAction::None);
action = std::exchange(credential_recovery_action_, CredentialRecoveryAction::Idle);
if (action == CredentialRecoveryAction::RetryActive) {
credential_recovery_attempt_pending_ = false;
}
+1 -1
View File
@@ -190,7 +190,7 @@ int GuiRuntime::CreateConnectionPeer() {
if (pending_identity.empty()) {
credential_recovery_in_progress_ = false;
credential_recovery_attempt_pending_ = false;
credential_recovery_action_ = CredentialRecoveryAction::None;
credential_recovery_action_ = CredentialRecoveryAction::Idle;
} else if (!credential_recovery_in_progress_) {
credential_recovery_in_progress_ = true;
credential_recovery_attempt_pending_ = true;
+2 -2
View File
@@ -168,7 +168,7 @@ struct UserSettingsState {
struct PasswordChangeState {
enum class CredentialRecoveryAction {
None, RetryActive, PromotePending, ClearPending, ResumePending
Idle, RetryActive, PromotePending, ClearPending, ResumePending
};
std::mutex password_change_mutex_;
uint64_t next_password_change_request_id_ = 0;
@@ -183,7 +183,7 @@ struct PasswordChangeState {
std::string password_change_error_;
bool credential_recovery_in_progress_ = false;
bool credential_recovery_attempt_pending_ = false;
CredentialRecoveryAction credential_recovery_action_ = CredentialRecoveryAction::None;
CredentialRecoveryAction credential_recovery_action_ = CredentialRecoveryAction::Idle;
};
struct ConnectionState {