!105 修复锁屏时两次调用blockGlobalShortcuts的问题
Merge pull request !105 from liudunfa/openkylin/nile
This commit is contained in:
parent
62c77ba27b
commit
16575180a3
|
@ -0,0 +1,40 @@
|
|||
From: =?utf-8?b?5p2o5pWP?= <yangmin@kylinos.cn>
|
||||
Date: Thu, 31 Oct 2024 07:46:01 +0000
|
||||
Subject: =?utf-8?b?ITEwNSDkv67lpI3plIHlsY/ml7bkuKTmrKHosIPnlKhibG9ja0dsb2Jh?=
|
||||
=?utf-8?b?bFNob3J0Y3V0c+eahOmXrumimCBNZXJnZSBwdWxsIHJlcXVlc3QgITEwNSBmcm9t?=
|
||||
=?utf-8?b?IGxpdWR1bmZhL29wZW5reWxpbi9uaWxl?=
|
||||
|
||||
---
|
||||
src/lock-backend/dbusupperinterface.cpp | 6 +++++-
|
||||
src/lock-backend/dbusupperinterface.h | 1 +
|
||||
2 files changed, 6 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/lock-backend/dbusupperinterface.cpp b/src/lock-backend/dbusupperinterface.cpp
|
||||
index 90dac4f..940d699 100644
|
||||
--- a/src/lock-backend/dbusupperinterface.cpp
|
||||
+++ b/src/lock-backend/dbusupperinterface.cpp
|
||||
@@ -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) {
|
||||
diff --git a/src/lock-backend/dbusupperinterface.h b/src/lock-backend/dbusupperinterface.h
|
||||
index 6070942..67302bb 100644
|
||||
--- a/src/lock-backend/dbusupperinterface.h
|
||||
+++ b/src/lock-backend/dbusupperinterface.h
|
||||
@@ -428,6 +428,7 @@ private:
|
||||
QByteArray pubKey, priKey;
|
||||
KglobalAccelHelper *m_kglobalHelper = nullptr;
|
||||
LibinputSwitchEvent *m_libinputSwitchEvent = nullptr;
|
||||
+ bool m_bBlockShortcutState = false;
|
||||
};
|
||||
|
||||
#endif // DBUSUPPERINTERFACE_H
|
|
@ -65,3 +65,4 @@
|
|||
0065-102-fixbug.patch
|
||||
0066-103-fixbug.patch
|
||||
0067-104-fixbug.patch
|
||||
0068-105-blockGlobalShortcuts.patch
|
||||
|
|
Loading…
Reference in New Issue