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
This commit is contained in:
parent
a21b74c05a
commit
53f6a337bf
1 changed files with 7 additions and 0 deletions
|
@ -50,6 +50,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#include <QTimerEvent>
|
#include <QTimerEvent>
|
||||||
#include <QDateTime>
|
#include <QDateTime>
|
||||||
#include <QOpenGLContext>
|
#include <QOpenGLContext>
|
||||||
|
#include <QQuickWindow>
|
||||||
#include <KGlobalAccel>
|
#include <KGlobalAccel>
|
||||||
#include <KLocalizedString>
|
#include <KLocalizedString>
|
||||||
#include <KPluginLoader>
|
#include <KPluginLoader>
|
||||||
|
@ -254,6 +255,12 @@ void Compositor::slotCompositingOptionsInitialized()
|
||||||
}
|
}
|
||||||
return;
|
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);
|
connect(m_scene, &Scene::resetCompositing, this, &Compositor::restart);
|
||||||
emit sceneCreated();
|
emit sceneCreated();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue