Changeset View
Changeset View
Standalone View
Standalone View
autotests/integration/kwin_wayland_test.cpp
Show First 20 Lines • Show All 77 Lines • ▼ Show 20 Line(s) | |||||
78 | { | 78 | { | ||
79 | setTerminating(); | 79 | setTerminating(); | ||
80 | kwinApp()->platform()->setOutputsEnabled(false); | 80 | kwinApp()->platform()->setOutputsEnabled(false); | ||
81 | // need to unload all effects prior to destroying X connection as they might do X calls | 81 | // need to unload all effects prior to destroying X connection as they might do X calls | ||
82 | // also before destroy Workspace, as effects might call into Workspace | 82 | // also before destroy Workspace, as effects might call into Workspace | ||
83 | if (effects) { | 83 | if (effects) { | ||
84 | static_cast<EffectsHandlerImpl*>(effects)->unloadAllEffects(); | 84 | static_cast<EffectsHandlerImpl*>(effects)->unloadAllEffects(); | ||
85 | } | 85 | } | ||
86 | if (m_xwayland) { | 86 | | ||
87 | // needs to be done before workspace gets destroyed | 87 | // Kill Xwayland before terminating its connection. | ||
88 | m_xwayland->prepareDestroy(); | 88 | delete m_xwayland; | ||
89 | } | 89 | m_xwayland = nullptr; | ||
90 | destroyWorkspace(); | 90 | | ||
91 | // Terminate all client connections before Workspace is destroyed. | ||||
92 | // Shell clients need to access RuleBook whose lifetime is bound | ||||
93 | // to the Workspace class. | ||||
94 | waylandServer()->terminateClientConnections(); | ||||
91 | waylandServer()->dispatch(); | 95 | waylandServer()->dispatch(); | ||
96 | | ||||
97 | destroyWorkspace(); | ||||
98 | | ||||
92 | if (QStyle *s = style()) { | 99 | if (QStyle *s = style()) { | ||
93 | s->unpolish(this); | 100 | s->unpolish(this); | ||
94 | } | 101 | } | ||
95 | // kill Xwayland before terminating its connection | 102 | | ||
96 | delete m_xwayland; | | |||
97 | waylandServer()->terminateClientConnections(); | | |||
98 | destroyCompositor(); | 103 | destroyCompositor(); | ||
99 | } | 104 | } | ||
100 | 105 | | |||
101 | void WaylandTestApplication::performStartup() | 106 | void WaylandTestApplication::performStartup() | ||
102 | { | 107 | { | ||
103 | // first load options - done internally by a different thread | 108 | // first load options - done internally by a different thread | ||
104 | createOptions(); | 109 | createOptions(); | ||
105 | waylandServer()->createInternalConnection(); | 110 | waylandServer()->createInternalConnection(); | ||
▲ Show 20 Lines • Show All 56 Lines • Show Last 20 Lines |