Commit 53f6a337 authored by Martin Flöser's avatar Martin Flöser

Force Software QtQuick rendering when starting with QPainter compositor

Summary:
If KWin/Wayland starts up with the QPainter compositor we force software
rendering in QtQuick. It doesn't make sense to try to use the OpenGL
renderer as that normally just results in an abort when trying to create
the QOpenGLContext.

Test Plan:
Run KWin with KWIN_COMPOSE=Q, tried to quick tile a window and
used Alt+Tab. Worked fine, didn't crash anymore.

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D8663
parent a21b74c0
......@@ -50,6 +50,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <QTimerEvent>
#include <QDateTime>
#include <QOpenGLContext>
#include <QQuickWindow>
#include <KGlobalAccel>
#include <KLocalizedString>
#include <KPluginLoader>
......@@ -254,6 +255,12 @@ void Compositor::slotCompositingOptionsInitialized()
}
return;
}
if (!Workspace::self() && m_scene && m_scene->compositingType() == QPainterCompositing) {
// Force Software QtQuick on first startup with QPainter
QQuickWindow::setSceneGraphBackend(QSGRendererInterface::Software);
}
connect(m_scene, &Scene::resetCompositing, this, &Compositor::restart);
emit sceneCreated();
......
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