diff --git a/src/dde-lock/lockworker.cpp b/src/dde-lock/lockworker.cpp index 032b3aab..75a59430 100644 --- a/src/dde-lock/lockworker.cpp +++ b/src/dde-lock/lockworker.cpp @@ -135,6 +135,16 @@ void LockWorker::initConnections() m_password.clear(); emit m_model->authFinished(true); }); + +#ifdef ENABLE_DSS_SNIPE + connect(m_sessionManagerInter, &SessionManagerInter::LockedChanged, this, [ this ](bool locked) { + qDebug() << "SessionManagerInter::LockedChanged" << locked; + if (locked && !m_model->visible()) { + m_model->showLockScreen(); + } + }); +#endif + /* org.freedesktop.login1.Session */ connect(m_login1SessionSelf, &Login1SessionSelf::ActiveChanged, this, [this](bool active) { qCInfo(DDE_SHELL) << "DBus lock service active changed, active: " << active << ", model visible: " << m_model->visible();