Enable Login Manager and stop emitting unlock
Call connectToLoginManager() in initialize(). Comment out lockStateChanged and screenUnlocked emissions to silence them.
This commit is contained in:
parent
e6fec6dfea
commit
7e919ddef9
|
|
@ -48,8 +48,7 @@ bool ScreenLockDetector::initialize()
|
|||
// 尝试连接到不同的DBus接口
|
||||
bool deepinOk = connectToDeepinDDE();
|
||||
bool gnomeOk = connectToGnomeScreenSaver();
|
||||
//bool loginOk = connectToLoginManager();
|
||||
bool loginOk = false;
|
||||
bool loginOk = connectToLoginManager();
|
||||
|
||||
if (!deepinOk && !gnomeOk && !loginOk) {
|
||||
qWarning() << "Failed to connect to any screen lock detection service";
|
||||
|
|
@ -79,12 +78,12 @@ void ScreenLockDetector::setLockState(bool locked)
|
|||
qDebug() << "## Screen lock state changed:" << (locked ? "LOCKED" : "UNLOCKED");
|
||||
qDebug() << "##################################################";
|
||||
|
||||
emit lockStateChanged(locked);
|
||||
// emit lockStateChanged(locked);
|
||||
|
||||
if (locked) {
|
||||
emit screenLocked();
|
||||
} else {
|
||||
emit screenUnlocked();
|
||||
// emit screenUnlocked();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue