Remove redundant initializeX11() in Compositor

Compositor::setupStart() already calls initializeX11(). This fixes
BadAccess warning on startup.

CCBUG: 455167
This commit is contained in:
Vlad Zahorodnii 2022-06-14 18:40:55 +03:00
parent 1e62fe99bd
commit 634e032201

View file

@ -159,6 +159,9 @@ Compositor::Compositor(QObject *workspace)
}, },
Qt::QueuedConnection); Qt::QueuedConnection);
connect(kwinApp(), &Application::x11ConnectionChanged, this, &Compositor::initializeX11);
connect(kwinApp(), &Application::x11ConnectionAboutToBeDestroyed, this, &Compositor::cleanupX11);
// register DBus // register DBus
new CompositorDBusInterface(this); new CompositorDBusInterface(this);
FTraceLogger::create(); FTraceLogger::create();
@ -358,12 +361,6 @@ void Compositor::cleanupX11()
void Compositor::startupWithWorkspace() void Compositor::startupWithWorkspace()
{ {
connect(kwinApp(), &Application::x11ConnectionChanged,
this, &Compositor::initializeX11, Qt::UniqueConnection);
connect(kwinApp(), &Application::x11ConnectionAboutToBeDestroyed,
this, &Compositor::cleanupX11, Qt::UniqueConnection);
initializeX11();
Q_ASSERT(m_scene); Q_ASSERT(m_scene);
m_scene->initialize(); m_scene->initialize();