Changeset View
Changeset View
Standalone View
Standalone View
main_wayland.cpp
Show First 20 Lines • Show All 122 Lines • ▼ Show 20 Line(s) | 118 | { | |||
---|---|---|---|---|---|
123 | 123 | | |||
124 | if (kwinApp()->platform()) { | 124 | if (kwinApp()->platform()) { | ||
125 | kwinApp()->platform()->setOutputsEnabled(false); | 125 | kwinApp()->platform()->setOutputsEnabled(false); | ||
126 | } | 126 | } | ||
127 | // need to unload all effects prior to destroying X connection as they might do X calls | 127 | // need to unload all effects prior to destroying X connection as they might do X calls | ||
128 | if (effects) { | 128 | if (effects) { | ||
129 | static_cast<EffectsHandlerImpl*>(effects)->unloadAllEffects(); | 129 | static_cast<EffectsHandlerImpl*>(effects)->unloadAllEffects(); | ||
130 | } | 130 | } | ||
131 | if (m_xwayland) { | 131 | | ||
132 | // needs to be done before workspace gets destroyed | 132 | // Kill Xwayland before terminating its connection. | ||
133 | m_xwayland->prepareDestroy(); | 133 | delete m_xwayland; | ||
134 | } | 134 | m_xwayland = nullptr; | ||
135 | destroyWorkspace(); | 135 | | ||
136 | // Terminate all client connections before Workspace is destroyed. | ||||
137 | // Shell clients need to access RuleBook whose lifetime is bound | ||||
138 | // to the Workspace class. | ||||
139 | waylandServer()->terminateClientConnections(); | ||||
136 | waylandServer()->dispatch(); | 140 | waylandServer()->dispatch(); | ||
137 | 141 | | |||
142 | destroyWorkspace(); | ||||
143 | | ||||
138 | if (QStyle *s = style()) { | 144 | if (QStyle *s = style()) { | ||
139 | s->unpolish(this); | 145 | s->unpolish(this); | ||
140 | } | 146 | } | ||
141 | // kill Xwayland before terminating its connection | 147 | | ||
142 | delete m_xwayland; | | |||
143 | m_xwayland = nullptr; | | |||
144 | waylandServer()->terminateClientConnections(); | | |||
145 | destroyCompositor(); | 148 | destroyCompositor(); | ||
146 | } | 149 | } | ||
147 | 150 | | |||
148 | void ApplicationWayland::performStartup() | 151 | void ApplicationWayland::performStartup() | ||
149 | { | 152 | { | ||
150 | if (m_startXWayland) { | 153 | if (m_startXWayland) { | ||
151 | setOperationMode(OperationModeXwayland); | 154 | setOperationMode(OperationModeXwayland); | ||
152 | } | 155 | } | ||
▲ Show 20 Lines • Show All 525 Lines • Show Last 20 Lines |