Skip to content

Commit 9033761

Browse files
committed
fix: cannot receive ActiveChanged signal when os was restarted
When the Active of login1 is changed to false, it will not cause the ActiveChanged signal to send because it is the same as the default value. This is a DTK bug and the default value is not initialized. Log: as title Pms: BUG-321333
1 parent c190ff8 commit 9033761

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

src/dde-session/impl/sessionmanager.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,14 @@ SessionManager::~SessionManager()
110110

111111
void SessionManager::initConnections()
112112
{
113+
// TODO: When the Active of login1 is changed to false,
114+
// it will not cause the ActiveChanged signal to send
115+
// because it is the same as the default value.
116+
// This is a DTK bug and the default value is not initialized.
117+
// Manually calling this interface will change the default default.
118+
const bool active = m_login1SessionInter->active();
119+
Q_UNUSED(active)
120+
113121
connect(m_login1SessionInter, &org::freedesktop::login1::Session::ActiveChanged, [=](bool active) {
114122
qDebug() << "session active status changed to:" << active;
115123
if (active) {

0 commit comments

Comments
 (0)