Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog/next.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
- Fixed WlSessionLockSurface.visible crashing if accessed before backing surface creation.
- Fixed mpris players returning `rate` for `minRate` and `maxRate`.
- Fixed missing/wrong change signals on various properties.
- Fixed session lock crashes on sleep, wake, DPMS, and unlocking.
8 changes: 6 additions & 2 deletions src/wayland/session_lock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,12 @@ void WlSessionLock::updateSurfaces(bool show, WlSessionLock* old) {
auto screens = QGuiApplication::screens();

screens.removeIf([](QScreen* screen) {
if (dynamic_cast<QtWaylandClient::QWaylandScreen*>(screen->handle()) == nullptr) {
auto* waylandScreen = dynamic_cast<QtWaylandClient::QWaylandScreen*>(screen->handle());
if (waylandScreen == nullptr || waylandScreen->isPlaceholder()
|| waylandScreen->output() == nullptr)
{
qDebug() << "Not creating lock surface for screen" << screen
<< "as it is not backed by a wayland screen.";
<< "as it is not backed by a valid wayland output.";

return true;
}
Expand Down Expand Up @@ -207,6 +210,7 @@ WlSessionLockSurface::WlSessionLockSurface(QObject* parent)

WlSessionLockSurface::~WlSessionLockSurface() {
if (this->window != nullptr) {
this->window->destroy();
this->window->deleteLater();
}
}
Expand Down
1 change: 1 addition & 0 deletions src/wayland/session_lock/surface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ QSWaylandSessionLockSurface::QSWaylandSessionLockSurface(QtWaylandClient::QWayla
}

QSWaylandSessionLockSurface::~QSWaylandSessionLockSurface() {
if (this->object() == nullptr) return;
if (this->ext != nullptr) this->ext->surface = nullptr;
this->destroy();
}
Expand Down
Loading