Skip to content

Commit cdbdeb8

Browse files
committed
wayland: destroy lock surfaces synchronously before unlocking
1 parent 4b4fca3 commit cdbdeb8

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

src/wayland/session_lock.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ void WlSessionLock::updateSurfaces(bool show, WlSessionLock* old) {
7070
for (auto& [screen, surface]: map) {
7171
if (!screens.contains(screen)) {
7272
this->surfaces.remove(screen);
73-
surface->deleteLater();
73+
delete surface;
7474
}
7575
}
7676

@@ -139,14 +139,13 @@ void WlSessionLock::realizeLockTarget(WlSessionLock* old) {
139139
void WlSessionLock::unlock() {
140140
if (this->isLocked()) {
141141
this->lockTarget = false;
142-
this->manager->unlock();
143-
144142
for (auto* surface: this->surfaces) {
145-
surface->deleteLater();
143+
delete surface;
146144
}
147-
148145
this->surfaces.clear();
149146

147+
this->manager->unlock();
148+
150149
emit this->lockStateChanged();
151150
}
152151
}

0 commit comments

Comments
 (0)