Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 46eceef2 authored by Martin Flöser's avatar Martin Flöser

[opengl] Drop functionality to start kcmshell compositing

Summary:
The idea of opening the compositing kcm was to show a warning. But that
broke quite some time ago without noticing. We had two ways:
 * pass through --args command line argument
 * use dbus call to already open kcm

Neither of the two ways is working. The kwincompositing doesn't parse
the arguments and the dbus interface doesn't exist any more.

Following the advice to remove functionality nobody noticed that it is
broken, this is removed with this change. This probably broke with
introducing the new KCM which happened IIRC for Plasma 5.0.

BUG: 393845
FIXED-IN: 5.14.0

Reviewers: #kwin, #plasma

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D13235
parent 69c7146a
......@@ -823,62 +823,8 @@ bool SceneOpenGL::viewportLimitsMatched(const QSize &size) const {
if (limit[0] < size.width() || limit[1] < size.height()) {
QMetaObject::invokeMethod(Compositor::self(), "suspend",
Qt::QueuedConnection, Q_ARG(Compositor::SuspendReason, Compositor::AllReasonSuspend));
const QString message = i18n("<h1>OpenGL desktop effects not possible</h1>"
"Your system cannot perform OpenGL Desktop Effects at the "
"current resolution<br><br>"
"You can try to select the XRender backend, but it "
"might be very slow for this resolution as well.<br>"
"Alternatively, lower the combined resolution of all screens "
"to %1x%2 ", limit[0], limit[1]);
const QString details = i18n("The demanded resolution exceeds the GL_MAX_VIEWPORT_DIMS "
"limitation of your GPU and is therefore not compatible "
"with the OpenGL compositor.<br>"
"XRender does not know such limitation, but the performance "
"will usually be impacted by the hardware limitations that "
"restrict the OpenGL viewport size.");
const int oldTimeout = QDBusConnection::sessionBus().interface()->timeout();
QDBusConnection::sessionBus().interface()->setTimeout(500);
if (QDBusConnection::sessionBus().interface()->isServiceRegistered(QStringLiteral("org.kde.kwinCompositingDialog")).value()) {
QDBusInterface dialog( QStringLiteral("org.kde.kwinCompositingDialog"), QStringLiteral("/CompositorSettings"), QStringLiteral("org.kde.kwinCompositingDialog") );
dialog.asyncCall(QStringLiteral("warn"), message, details, QString());
} else {
const QString args = QLatin1String("warn ") + QString::fromUtf8(message.toLocal8Bit().toBase64()) + QLatin1String(" details ") + QString::fromUtf8(details.toLocal8Bit().toBase64());
KProcess::startDetached(QStringLiteral("kcmshell5"), QStringList() << QStringLiteral("kwincompositing") << QStringLiteral("--args") << args);
}
QDBusConnection::sessionBus().interface()->setTimeout(oldTimeout);
return false;
}
glGetIntegerv(GL_MAX_TEXTURE_SIZE, limit);
if (limit[0] < size.width() || limit[0] < size.height()) {
KConfig cfg(QStringLiteral("kwin_dialogsrc"));
if (!KConfigGroup(&cfg, "Notification Messages").readEntry("max_tex_warning", true))
return true;
const QString message = i18n("<h1>OpenGL desktop effects might be unusable</h1>"
"OpenGL Desktop Effects at the current resolution are supported "
"but might be exceptionally slow.<br>"
"Also large windows will turn entirely black.<br><br>"
"Consider to suspend compositing, switch to the XRender backend "
"or lower the resolution to %1x%1." , limit[0]);
const QString details = i18n("The demanded resolution exceeds the GL_MAX_TEXTURE_SIZE "
"limitation of your GPU, thus windows of that size cannot be "
"assigned to textures and will be entirely black.<br>"
"Also this limit will often be a performance level barrier despite "
"below GL_MAX_VIEWPORT_DIMS, because the driver might fall back to "
"software rendering in this case.");
const int oldTimeout = QDBusConnection::sessionBus().interface()->timeout();
QDBusConnection::sessionBus().interface()->setTimeout(500);
if (QDBusConnection::sessionBus().interface()->isServiceRegistered(QStringLiteral("org.kde.kwinCompositingDialog")).value()) {
QDBusInterface dialog( QStringLiteral("org.kde.kwinCompositingDialog"), QStringLiteral("/CompositorSettings"), QStringLiteral("org.kde.kwinCompositingDialog") );
dialog.asyncCall(QStringLiteral("warn"), message, details, QStringLiteral("kwin_dialogsrc:max_tex_warning"));
} else {
const QString args = QLatin1String("warn ") + QString::fromUtf8(message.toLocal8Bit().toBase64()) + QLatin1String(" details ") +
QString::fromUtf8(details.toLocal8Bit().toBase64()) + QLatin1String(" dontagain kwin_dialogsrc:max_tex_warning");
KProcess::startDetached(QStringLiteral("kcmshell5"), QStringList() << QStringLiteral("kwincompositing") << QStringLiteral("--args") << args);
}
QDBusConnection::sessionBus().interface()->setTimeout(oldTimeout);
}
return true;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment