Skip to content

Commit 0e69f1c

Browse files
committed
wayland: skip lock surfaces for placeholder/invalid outputs
1 parent cdbdeb8 commit 0e69f1c

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

src/wayland/session_lock.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,12 @@ void WlSessionLock::updateSurfaces(bool show, WlSessionLock* old) {
5656
auto screens = QGuiApplication::screens();
5757

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

6366
return true;
6467
}

0 commit comments

Comments
 (0)