wayland_server: Improve debug message, reduce duplicates
Summary: Demote the "interface not granted" message from a warning to debug and improve the wording a bit. We are listing all the interfaces, it's not like we're not granting an interface that the application wants, it's that we're not offering an interface to an application because it didn't opt in. Only report every miss once, to reduce the noise. Test Plan: ran kwin Reviewers: #kwin, davidedmundson Reviewed By: #kwin, davidedmundson Subscribers: kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D29759
This commit is contained in:
parent
22bb30ed9c
commit
d6e119f49e
1 changed files with 9 additions and 2 deletions
|
@ -234,7 +234,8 @@ public:
|
|||
return interfaces;
|
||||
}
|
||||
|
||||
QSet<QByteArray> interfacesBlackList = {"org_kde_kwin_remote_access_manager", "org_kde_plasma_window_management", "org_kde_kwin_fake_input", "org_kde_kwin_keystate"};
|
||||
const QSet<QByteArray> interfacesBlackList = {"org_kde_kwin_remote_access_manager", "org_kde_plasma_window_management", "org_kde_kwin_fake_input", "org_kde_kwin_keystate"};
|
||||
QSet<QString> m_reported;
|
||||
|
||||
bool allowInterface(KWaylandServer::ClientConnection *client, const QByteArray &interfaceName) override {
|
||||
if (client->processId() == getpid()) {
|
||||
|
@ -257,7 +258,13 @@ public:
|
|||
client->setProperty("requestedInterfaces", requestedInterfaces);
|
||||
}
|
||||
if (!requestedInterfaces.toStringList().contains(QString::fromUtf8(interfaceName))) {
|
||||
qCWarning(KWIN_CORE) << "Did not grant the interface" << interfaceName << "to" << client->executablePath() << ". Please request it under X-KDE-Wayland-Interfaces";
|
||||
if (KWIN_CORE().isDebugEnabled()) {
|
||||
const QString id = client->executablePath() + QLatin1Char('|') + QString::fromUtf8(interfaceName);
|
||||
if (!m_reported.contains({id})) {
|
||||
m_reported.insert(id);
|
||||
qCDebug(KWIN_CORE) << "Interface" << interfaceName << "not in X-KDE-Wayland-Interfaces of" << client->executablePath();
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue