mirror of
https://github.com/kunkundi/crossdesk.git
synced 2026-11-02 03:52:43 +08:00
[fix] avoid X11 None macro collision in credential recovery
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user