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.
This commit is contained in:
parent
e1279e516c
commit
6c9e0781cd
4 changed files with 2 additions and 6 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue