diff --git a/debian/changelog b/debian/changelog index 74382eb2..851ebab2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +dde-tray-loader (1.99.12) UNRELEASED; urgency=medium + + * Temporary disable some plugins for Treeland + + -- Wang Zichong Thu, 16 Jan 2025 12:07:00 +0800 + dde-tray-loader (1.99.11) UNRELEASED; urgency=medium * fix: Datetime plugin display problem (#230)(Bug: 276275) diff --git a/src/loader/pluginmanager.cpp b/src/loader/pluginmanager.cpp index 63dcb092..aabd09c0 100644 --- a/src/loader/pluginmanager.cpp +++ b/src/loader/pluginmanager.cpp @@ -48,6 +48,23 @@ QVector PluginManager::loadedPlugins() const void PluginManager::loadPlugin(const QString &pluginFilePath) { + QStringList blacklistedPluginPaths; + // TODO: use dconfig for this purpose. + if (qgetenv("XDG_SESSION_TYPE") == "wayland") { + blacklistedPluginPaths.append(QStringList{ + "libshot-start-record-plugin.so", + "libshot-start-plugin.so", + "libdeepin-screen-recorder-plugin.so", + "libeye-comfort-mode.so", + }); + } + for (const QString &path : blacklistedPluginPaths) { + if (pluginFilePath.endsWith(path)) { + qDebug() << "Skipping blacklisted plugin:" << pluginFilePath; + return; + } + } + auto *pluginLoader = new QPluginLoader(pluginFilePath, this); const QJsonObject &meta = pluginLoader->metaData().value("MetaData").toObject(); const QString &pluginApi = meta.value("api").toString();