diff --git a/src/wayland_server.cpp b/src/wayland_server.cpp index 4317c13176..1a41761efb 100644 --- a/src/wayland_server.cpp +++ b/src/wayland_server.cpp @@ -587,7 +587,6 @@ void WaylandServer::initScreenLocker() connect(seat, &KWaylandServer::SeatInterface::timestampChanged, screenLockerApp, &ScreenLocker::KSldApp::userActivity); } - Q_EMIT lockStateChanged(); }); connect(ScreenLocker::KSldApp::self(), &ScreenLocker::KSldApp::unlocked, this, [this, screenLockerApp]() { @@ -603,9 +602,10 @@ void WaylandServer::initScreenLocker() screenLockerApp, &ScreenLocker::KSldApp::userActivity); } ScreenLocker::KSldApp::self()->setWaylandFd(-1); - Q_EMIT lockStateChanged(); }); + connect(screenLockerApp, &ScreenLocker::KSldApp::lockStateChanged, this, &WaylandServer::lockStateChanged); + ScreenLocker::KSldApp::self()->initialize(); if (m_initFlags.testFlag(InitializationFlag::LockScreen)) {