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接口
|
// 尝试连接到不同的DBus接口
|
||||||
bool deepinOk = connectToDeepinDDE();
|
bool deepinOk = connectToDeepinDDE();
|
||||||
bool gnomeOk = connectToGnomeScreenSaver();
|
bool gnomeOk = connectToGnomeScreenSaver();
|
||||||
//bool loginOk = connectToLoginManager();
|
bool loginOk = connectToLoginManager();
|
||||||
bool loginOk = false;
|
|
||||||
|
|
||||||
if (!deepinOk && !gnomeOk && !loginOk) {
|
if (!deepinOk && !gnomeOk && !loginOk) {
|
||||||
qWarning() << "Failed to connect to any screen lock detection service";
|
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() << "## Screen lock state changed:" << (locked ? "LOCKED" : "UNLOCKED");
|
||||||
qDebug() << "##################################################";
|
qDebug() << "##################################################";
|
||||||
|
|
||||||
emit lockStateChanged(locked);
|
// emit lockStateChanged(locked);
|
||||||
|
|
||||||
if (locked) {
|
if (locked) {
|
||||||
emit screenLocked();
|
emit screenLocked();
|
||||||
} else {
|
} else {
|
||||||
emit screenUnlocked();
|
// emit screenUnlocked();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue