From 634e032201333d1816dc15e5ec8fce5c43797de7 Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Tue, 14 Jun 2022 18:40:55 +0300 Subject: [PATCH] Remove redundant initializeX11() in Compositor Compositor::setupStart() already calls initializeX11(). This fixes BadAccess warning on startup. CCBUG: 455167 --- src/composite.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/composite.cpp b/src/composite.cpp index 4667fc0912..670b564acd 100644 --- a/src/composite.cpp +++ b/src/composite.cpp @@ -159,6 +159,9 @@ Compositor::Compositor(QObject *workspace) }, Qt::QueuedConnection); + connect(kwinApp(), &Application::x11ConnectionChanged, this, &Compositor::initializeX11); + connect(kwinApp(), &Application::x11ConnectionAboutToBeDestroyed, this, &Compositor::cleanupX11); + // register DBus new CompositorDBusInterface(this); FTraceLogger::create(); @@ -358,12 +361,6 @@ void Compositor::cleanupX11() 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); m_scene->initialize();