Simplify no compositing code path in Compositor::setupStart()

If either the render backend or the scene has failed to initialize,
both m_backend and m_scene will be null.
This commit is contained in:
Vlad Zahorodnii 2021-11-10 12:10:34 +02:00
parent 44dff155b4
commit f3071707f9

View file

@ -281,13 +281,9 @@ bool Compositor::setupStart()
} }
} }
if (m_scene == nullptr || m_scene->initFailed()) { if (!m_backend) {
qCCritical(KWIN_CORE) << "Failed to initialize compositing, compositing disabled";
m_state = State::Off; m_state = State::Off;
delete m_scene;
m_scene = nullptr;
if (auto *con = kwinApp()->x11Connection()) { if (auto *con = kwinApp()->x11Connection()) {
xcb_composite_unredirect_subwindows(con, kwinApp()->x11RootWindow(), xcb_composite_unredirect_subwindows(con, kwinApp()->x11RootWindow(),
XCB_COMPOSITE_REDIRECT_MANUAL); XCB_COMPOSITE_REDIRECT_MANUAL);