File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change 11#include " session_lock.hpp"
22
3+ #include < private/qwaylandscreen_p.h>
34#include < qcolor.h>
45#include < qcoreapplication.h>
56#include < qguiapplication.h>
@@ -52,6 +53,17 @@ void WlSessionLock::onReload(QObject* oldInstance) {
5253void WlSessionLock::updateSurfaces (bool show, WlSessionLock* old) {
5354 auto screens = QGuiApplication::screens ();
5455
56+ screens.removeIf ([](QScreen* screen) {
57+ if (dynamic_cast <QtWaylandClient::QWaylandScreen*>(screen->handle ()) == nullptr ) {
58+ qDebug () << " Not creating lock surface for screen" << screen
59+ << " as it is not backed by a wayland screen." ;
60+
61+ return true ;
62+ }
63+
64+ return false ;
65+ });
66+
5567 auto map = this ->surfaces .toStdMap ();
5668 for (auto & [screen, surface]: map) {
5769 if (!screens.contains (screen)) {
You can’t perform that action at this time.
0 commit comments