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) {
|
if (effects) {
|
||||||
static_cast<EffectsHandlerImpl*>(effects)->unloadAllEffects();
|
static_cast<EffectsHandlerImpl*>(effects)->unloadAllEffects();
|
||||||
}
|
}
|
||||||
destroyPlugins();
|
|
||||||
delete m_xwayland;
|
delete m_xwayland;
|
||||||
m_xwayland = nullptr;
|
m_xwayland = nullptr;
|
||||||
destroyWorkspace();
|
destroyWorkspace();
|
||||||
|
@ -90,7 +89,6 @@ WaylandTestApplication::~WaylandTestApplication()
|
||||||
}
|
}
|
||||||
waylandServer()->terminateClientConnections();
|
waylandServer()->terminateClientConnections();
|
||||||
destroyCompositor();
|
destroyCompositor();
|
||||||
destroyColorManager();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void WaylandTestApplication::performStartup()
|
void WaylandTestApplication::performStartup()
|
||||||
|
|
|
@ -148,6 +148,8 @@ void Application::start()
|
||||||
Application::~Application()
|
Application::~Application()
|
||||||
{
|
{
|
||||||
delete options;
|
delete options;
|
||||||
|
destroyPlugins();
|
||||||
|
destroyColorManager();
|
||||||
destroyAtoms();
|
destroyAtoms();
|
||||||
destroyPlatform();
|
destroyPlatform();
|
||||||
}
|
}
|
||||||
|
|
|
@ -136,7 +136,6 @@ ApplicationWayland::~ApplicationWayland()
|
||||||
if (effects) {
|
if (effects) {
|
||||||
static_cast<EffectsHandlerImpl*>(effects)->unloadAllEffects();
|
static_cast<EffectsHandlerImpl*>(effects)->unloadAllEffects();
|
||||||
}
|
}
|
||||||
destroyPlugins();
|
|
||||||
delete m_xwayland;
|
delete m_xwayland;
|
||||||
m_xwayland = nullptr;
|
m_xwayland = nullptr;
|
||||||
destroyWorkspace();
|
destroyWorkspace();
|
||||||
|
@ -147,7 +146,6 @@ ApplicationWayland::~ApplicationWayland()
|
||||||
}
|
}
|
||||||
waylandServer()->terminateClientConnections();
|
waylandServer()->terminateClientConnections();
|
||||||
destroyCompositor();
|
destroyCompositor();
|
||||||
destroyColorManager();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ApplicationWayland::performStartup()
|
void ApplicationWayland::performStartup()
|
||||||
|
|
|
@ -190,8 +190,6 @@ void ApplicationX11::setReplace(bool replace)
|
||||||
void ApplicationX11::lostSelection()
|
void ApplicationX11::lostSelection()
|
||||||
{
|
{
|
||||||
sendPostedEvents();
|
sendPostedEvents();
|
||||||
destroyPlugins();
|
|
||||||
destroyColorManager();
|
|
||||||
destroyCompositor();
|
destroyCompositor();
|
||||||
destroyWorkspace();
|
destroyWorkspace();
|
||||||
// Remove windowmanager privileges
|
// Remove windowmanager privileges
|
||||||
|
|
Loading…
Reference in a new issue