[autotests/integration] Unload effects before destroying Workspace

Brings in line with behavior in main_wayland.cpp and is needed as
effects might call into Workspace during tear down.
This commit is contained in:
Martin Gräßlin 2016-07-04 14:37:35 +02:00
parent da36fd1c02
commit 2b5747dccb

View file

@ -57,12 +57,13 @@ WaylandTestApplication::WaylandTestApplication(int &argc, char **argv)
WaylandTestApplication::~WaylandTestApplication() WaylandTestApplication::~WaylandTestApplication()
{ {
kwinApp()->platform()->setOutputsEnabled(false); kwinApp()->platform()->setOutputsEnabled(false);
destroyWorkspace();
waylandServer()->dispatch();
// need to unload all effects prior to destroying X connection as they might do X calls // need to unload all effects prior to destroying X connection as they might do X calls
// also before destroy Workspace, as effects might call into Workspace
if (effects) { if (effects) {
static_cast<EffectsHandlerImpl*>(effects)->unloadAllEffects(); static_cast<EffectsHandlerImpl*>(effects)->unloadAllEffects();
} }
destroyWorkspace();
waylandServer()->dispatch();
disconnect(m_xwaylandFailConnection); disconnect(m_xwaylandFailConnection);
if (x11Connection()) { if (x11Connection()) {
Xcb::setInputFocus(XCB_INPUT_FOCUS_POINTER_ROOT); Xcb::setInputFocus(XCB_INPUT_FOCUS_POINTER_ROOT);