From d8ff9006e8e36e24aa1b4cf3eb1a1034d8ff8300 Mon Sep 17 00:00:00 2001 From: zhaoyingzhen Date: Wed, 7 May 2025 11:39:20 +0800 Subject: [PATCH] fix: show lock window when session active changed as title Log: as title Pms: BUG-315417 --- src/dde-lock/lockworker.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) 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();