diff --git a/src/wayland/session_lock.cpp b/src/wayland/session_lock.cpp index 5f0bb673..ccba9bc6 100644 --- a/src/wayland/session_lock.cpp +++ b/src/wayland/session_lock.cpp @@ -1,5 +1,6 @@ #include "session_lock.hpp" +#include #include #include #include @@ -52,6 +53,17 @@ void WlSessionLock::onReload(QObject* oldInstance) { void WlSessionLock::updateSurfaces(bool show, WlSessionLock* old) { auto screens = QGuiApplication::screens(); + screens.removeIf([](QScreen* screen) { + if (dynamic_cast(screen->handle()) == nullptr) { + qDebug() << "Not creating lock surface for screen" << screen + << "as it is not backed by a wayland screen."; + + return true; + } + + return false; + }); + auto map = this->surfaces.toStdMap(); for (auto& [screen, surface]: map) { if (!screens.contains(screen)) {