|
|
|
|
@ -625,16 +625,6 @@ void WaylandServer::initScreenLocker() |
|
|
|
|
ScreenLocker::KSldApp::self()->setGreeterEnvironment(kwinApp()->processStartupEnvironment()); |
|
|
|
|
|
|
|
|
|
connect(ScreenLocker::KSldApp::self(), &ScreenLocker::KSldApp::aboutToLock, this, [this, screenLockerApp]() { |
|
|
|
|
if (m_screenLockerClientConnection) { |
|
|
|
|
// Already sent data to KScreenLocker.
|
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
int clientFd = createScreenLockerConnection(); |
|
|
|
|
if (clientFd < 0) { |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
ScreenLocker::KSldApp::self()->setWaylandFd(clientFd); |
|
|
|
|
|
|
|
|
|
new LockScreenPresentationWatcher(this); |
|
|
|
|
|
|
|
|
|
const QList<SeatInterface *> seatIfaces = m_display->seats(); |
|
|
|
|
@ -644,6 +634,19 @@ void WaylandServer::initScreenLocker() |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
connect(ScreenLocker::KSldApp::self(), &ScreenLocker::KSldApp::aboutToStartGreeter, this, [this]() { |
|
|
|
|
if (m_screenLockerClientConnection) { |
|
|
|
|
m_screenLockerClientConnection->destroy(); |
|
|
|
|
delete m_screenLockerClientConnection; |
|
|
|
|
m_screenLockerClientConnection = nullptr; |
|
|
|
|
} |
|
|
|
|
int clientFd = createScreenLockerConnection(); |
|
|
|
|
if (clientFd < 0) { |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
ScreenLocker::KSldApp::self()->setWaylandFd(clientFd); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
connect(ScreenLocker::KSldApp::self(), &ScreenLocker::KSldApp::unlocked, this, [this, screenLockerApp]() { |
|
|
|
|
if (m_screenLockerClientConnection) { |
|
|
|
|
m_screenLockerClientConnection->destroy(); |
|
|
|
|
|