!105 修复锁屏时两次调用blockGlobalShortcuts的问题

Merge pull request !105 from liudunfa/openkylin/nile
This commit is contained in:
杨敏 2024-10-31 07:46:01 +00:00 committed by Gitee
commit 9fbd241f2c
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 6 additions and 1 deletions

View File

@ -623,7 +623,11 @@ void DbusUpperInterface::emitLockState(bool val)
{
qDebug() << "emitLockState state = " << val;
m_kglobalHelper->blockShortcut(val);
if (val != m_bBlockShortcutState) {
m_kglobalHelper->blockShortcut(val);
m_bBlockShortcutState = val;
qDebug() << " block all shortcut " << "blockShortcut states = " << m_bBlockShortcutState;
}
QDBusMessage message;
if (val) {

View File

@ -428,6 +428,7 @@ private:
QByteArray pubKey, priKey;
KglobalAccelHelper *m_kglobalHelper = nullptr;
LibinputSwitchEvent *m_libinputSwitchEvent = nullptr;
bool m_bBlockShortcutState = false;
};
#endif // DBUSUPPERINTERFACE_H