锁屏时调用kwin的blockGlobalShortcuts来屏蔽快捷键
This commit is contained in:
parent
3e4413205c
commit
1c79f46ff7
|
@ -17,3 +17,4 @@ X-UKUI-Bugzilla-Product=ukui-screensaver
|
|||
X-UKUI-Bugzilla-Component=general
|
||||
X-UKUI-Bugzilla-Version=1.0.0
|
||||
OnlyShowIn=UKUI
|
||||
X-UKUI-AutoRestart=true
|
||||
|
|
|
@ -86,6 +86,12 @@ void Interface::SetLockState()
|
|||
|
||||
void Interface::emitLockState(bool val)
|
||||
{
|
||||
qDebug()<<"emitLockState state = "<<val;
|
||||
QDBusInterface interface("org.kde.KWin",
|
||||
"/kglobalaccel",
|
||||
"org.kde.KGlobalAccel",
|
||||
QDBusConnection::sessionBus());
|
||||
interface.call("blockGlobalShortcuts",val);
|
||||
QDBusMessage message;
|
||||
if(val){
|
||||
message = QDBusMessage::createSignal(SS_DBUS_PATH,
|
||||
|
|
Loading…
Reference in New Issue