勿扰模式判断增加判断有是否存在全屏激活窗口功能

Signed-off-by: iaom <zhangpengfei@kylinos.cn>
This commit is contained in:
iaom 2023-04-25 16:10:28 +08:00
parent c2b047fdc9
commit 6b355e273c
1 changed files with 9 additions and 1 deletions

View File

@ -22,6 +22,7 @@
#include <QQmlEngine>
#include <QDBusInterface>
#include <QDBusReply>
#include <QDBusMessage>
#include <QDebug>
#include "settings-manager.h"
#include "settings-properties.h"
@ -193,7 +194,14 @@ bool NotificationGlobalSettings::isDND() {
}
if(!dnd) {
if(DNDWhileFullScreen()) {
//todo
QDBusMessage msg = QDBusMessage::createMethodCall(QStringLiteral("org.kde.KWin"),
QStringLiteral("/KWin"),
QStringLiteral("org.kde.KWin"),
QStringLiteral("haveFullScreenActiveWindow"));
QDBusReply<bool> reply = QDBusConnection::sessionBus().call(msg);
if(reply.isValid()) {
dnd = reply.value();
}
}
}
return dnd;