Commit 6c9e0781 authored by Vlad Zahorodnii's avatar Vlad Zahorodnii
Browse files

Simplify code that destroys plugins and color manager

This reduces some code duplication and ensures that plugins and the
color manager are destroyed while Platform is still valid.
parent e1279e51
......@@ -80,7 +80,6 @@ WaylandTestApplication::~WaylandTestApplication()
if (effects) {
static_cast<EffectsHandlerImpl*>(effects)->unloadAllEffects();
}
destroyPlugins();
delete m_xwayland;
m_xwayland = nullptr;
destroyWorkspace();
......@@ -90,7 +89,6 @@ WaylandTestApplication::~WaylandTestApplication()
}
waylandServer()->terminateClientConnections();
destroyCompositor();
destroyColorManager();
}
void WaylandTestApplication::performStartup()
......
......@@ -148,6 +148,8 @@ void Application::start()
Application::~Application()
{
delete options;
destroyPlugins();
destroyColorManager();
destroyAtoms();
destroyPlatform();
}
......
......@@ -136,7 +136,6 @@ ApplicationWayland::~ApplicationWayland()
if (effects) {
static_cast<EffectsHandlerImpl*>(effects)->unloadAllEffects();
}
destroyPlugins();
delete m_xwayland;
m_xwayland = nullptr;
destroyWorkspace();
......@@ -147,7 +146,6 @@ ApplicationWayland::~ApplicationWayland()
}
waylandServer()->terminateClientConnections();
destroyCompositor();
destroyColorManager();
}
void ApplicationWayland::performStartup()
......
......@@ -190,8 +190,6 @@ void ApplicationX11::setReplace(bool replace)
void ApplicationX11::lostSelection()
{
sendPostedEvents();
destroyPlugins();
destroyColorManager();
destroyCompositor();
destroyWorkspace();
// Remove windowmanager privileges
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment