Skip to content

Commit 148c6c6

Browse files
committed
services/polkit: dequeue authentication request after it has finished
Popping immediately destroys the purpose of queueing. Newer requests takes over currently active one. Signed-off-by: Aditya Alok <dev.aditya.alok@gmail.com>
1 parent d1760ed commit 148c6c6

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

changelog/next.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
## Bug Fixes
22

3+
- Fixed newer polkit requests overtaking currently active one.
34
- Fixed ScreencopyView not displaying when only lock surfaces are shown.
45
- Fixed WlSessionLockSurface.visible crashing if accessed before backing surface creation.

src/services/polkit/agentimpl.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,6 @@ void PolkitAgentImpl::activateAuthenticationRequest() {
133133
if (this->queuedRequests.empty()) return;
134134

135135
AuthRequest* req = this->queuedRequests.front();
136-
this->queuedRequests.pop_front();
137136
qCDebug(logPolkit) << "activating authentication request for action" << req->actionId
138137
<< ", cookie: " << req->cookie;
139138

@@ -171,6 +170,10 @@ void PolkitAgentImpl::finishAuthenticationRequest() {
171170

172171
this->bActiveFlow.value()->deleteLater();
173172

173+
if (!this->queuedRequests.empty()) {
174+
this->queuedRequests.pop_front();
175+
}
176+
174177
if (!this->queuedRequests.empty()) {
175178
this->activateAuthenticationRequest();
176179
} else {

0 commit comments

Comments
 (0)