Skip to content

Commit d320125

Browse files
sync: from linuxdeepin/dde-session-shell
Synchronize source files from linuxdeepin/dde-session-shell. Source-pull-request: linuxdeepin/dde-session-shell#53
1 parent b716736 commit d320125

1 file changed

Lines changed: 6 additions & 9 deletions

File tree

src/dde-lock/lockworker.cpp

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -138,15 +138,6 @@ void LockWorker::initConnections()
138138
emit m_model->authFinished(true);
139139
});
140140

141-
#ifdef ENABLE_DSS_SNIPE
142-
connect(m_sessionManagerInter, &SessionManagerInter::LockedChanged, this, [ this ](bool locked) {
143-
qDebug() << "SessionManagerInter::LockedChanged" << locked;
144-
if (locked && !m_model->visible()) {
145-
m_model->showLockScreen();
146-
}
147-
});
148-
#endif
149-
150141
/* org.freedesktop.login1.Session */
151142
connect(m_login1SessionSelf, &Login1SessionSelf::ActiveChanged, this, [this](bool active) {
152143
qCInfo(DDE_SHELL) << "DBus lock service active changed, active: " << active << ", model visible: " << m_model->visible();
@@ -161,6 +152,12 @@ void LockWorker::initConnections()
161152
endAuthentication(m_account, AT_All);
162153
destroyAuthentication(m_account);
163154
}
155+
156+
#ifdef ENABLE_DSS_SNIPE
157+
if (active && !m_model->visible()) {
158+
m_model->showLockScreen();
159+
}
160+
#endif
164161
});
165162

166163
// 在待机时启动定时器,如果定时器超时的时间离待机时间大于15秒,则认为已经唤醒,停止定时器,并设置黑屏模式为false

0 commit comments

Comments
 (0)