backends/wayland: fall back to qpainter when there's no render node

While we could still access the primary node, as we're not getting GPU acceleration
anyways we might as well fall back to CPU rendering directly

BUG: 466302
This commit is contained in:
Xaver Hugl 2023-02-23 19:46:19 +01:00
parent 017bb6d3c8
commit 5f0ea95bfa

View file

@ -431,7 +431,9 @@ WaylandBackend::~WaylandBackend()
m_seat.reset();
m_display.reset();
gbm_device_destroy(m_gbmDevice);
if (m_gbmDevice) {
gbm_device_destroy(m_gbmDevice);
}
qCDebug(KWIN_WAYLAND_BACKEND) << "Destroyed Wayland display";
}
@ -554,7 +556,7 @@ void WaylandBackend::togglePointerLock()
QVector<CompositingType> WaylandBackend::supportedCompositors() const
{
QVector<CompositingType> ret;
if (m_display->linuxDmabuf()) {
if (m_display->linuxDmabuf() && m_gbmDevice) {
ret.append(OpenGLCompositing);
}
ret.append(QPainterCompositing);