Changeset View
Changeset View
Standalone View
Standalone View
composite.cpp
Show First 20 Lines • Show All 195 Lines • ▼ Show 20 Line(s) | 194 | { | |||
---|---|---|---|---|---|
196 | 196 | | |||
197 | // There might still be a deleted around, needs to be cleared before creating the scene (BUG 333275) | 197 | // There might still be a deleted around, needs to be cleared before creating the scene (BUG 333275) | ||
198 | if (Workspace::self()) { | 198 | if (Workspace::self()) { | ||
199 | while (!Workspace::self()->deletedList().isEmpty()) { | 199 | while (!Workspace::self()->deletedList().isEmpty()) { | ||
200 | Workspace::self()->deletedList().first()->discard(); | 200 | Workspace::self()->deletedList().first()->discard(); | ||
201 | } | 201 | } | ||
202 | } | 202 | } | ||
203 | 203 | | |||
204 | emit aboutToToggleCompositing(); | ||||
205 | | ||||
204 | auto supportedCompositors = kwinApp()->platform()->supportedCompositors(); | 206 | auto supportedCompositors = kwinApp()->platform()->supportedCompositors(); | ||
205 | const auto userConfigIt = std::find(supportedCompositors.begin(), supportedCompositors.end(), options->compositingMode()); | 207 | const auto userConfigIt = std::find(supportedCompositors.begin(), supportedCompositors.end(), options->compositingMode()); | ||
206 | if (userConfigIt != supportedCompositors.end()) { | 208 | if (userConfigIt != supportedCompositors.end()) { | ||
207 | supportedCompositors.erase(userConfigIt); | 209 | supportedCompositors.erase(userConfigIt); | ||
208 | supportedCompositors.prepend(options->compositingMode()); | 210 | supportedCompositors.prepend(options->compositingMode()); | ||
209 | } else { | 211 | } else { | ||
210 | qCWarning(KWIN_CORE) << "Configured compositor not supported by Platform. Falling back to defaults"; | 212 | qCWarning(KWIN_CORE) << "Configured compositor not supported by Platform. Falling back to defaults"; | ||
211 | } | 213 | } | ||
▲ Show 20 Lines • Show All 156 Lines • ▼ Show 20 Line(s) | |||||
368 | 370 | | |||
369 | void Compositor::finish() | 371 | void Compositor::finish() | ||
370 | { | 372 | { | ||
371 | if (!hasScene()) | 373 | if (!hasScene()) | ||
372 | return; | 374 | return; | ||
373 | m_finishing = true; | 375 | m_finishing = true; | ||
374 | m_releaseSelectionTimer.start(); | 376 | m_releaseSelectionTimer.start(); | ||
375 | 377 | | |||
378 | emit aboutToToggleCompositing(); | ||||
379 | | ||||
376 | // Some effects might need access to effect windows when they are about to | 380 | // Some effects might need access to effect windows when they are about to | ||
377 | // be destroyed, for example to unreference deleted windows, so we have to | 381 | // be destroyed, for example to unreference deleted windows, so we have to | ||
378 | // make sure that effect windows outlive effects. | 382 | // make sure that effect windows outlive effects. | ||
379 | delete effects; | 383 | delete effects; | ||
380 | effects = nullptr; | 384 | effects = nullptr; | ||
381 | 385 | | |||
382 | if (Workspace::self()) { | 386 | if (Workspace::self()) { | ||
383 | foreach (Client * c, Workspace::self()->clientList()) | 387 | foreach (Client * c, Workspace::self()->clientList()) | ||
▲ Show 20 Lines • Show All 799 Lines • ▼ Show 20 Line(s) | |||||
1183 | // Client | 1187 | // Client | ||
1184 | //**************************************** | 1188 | //**************************************** | ||
1185 | 1189 | | |||
1186 | bool Client::setupCompositing() | 1190 | bool Client::setupCompositing() | ||
1187 | { | 1191 | { | ||
1188 | if (!Toplevel::setupCompositing()){ | 1192 | if (!Toplevel::setupCompositing()){ | ||
1189 | return false; | 1193 | return false; | ||
1190 | } | 1194 | } | ||
1191 | if (isDecorated()) { | | |||
1192 | decoratedClient()->destroyRenderer(); | | |||
1193 | } | | |||
1194 | updateVisibility(); // for internalKeep() | 1195 | updateVisibility(); // for internalKeep() | ||
1195 | return true; | 1196 | return true; | ||
1196 | } | 1197 | } | ||
1197 | 1198 | | |||
1198 | void Client::finishCompositing(ReleaseReason releaseReason) | 1199 | void Client::finishCompositing(ReleaseReason releaseReason) | ||
1199 | { | 1200 | { | ||
1200 | Toplevel::finishCompositing(releaseReason); | 1201 | Toplevel::finishCompositing(releaseReason); | ||
1201 | updateVisibility(); | 1202 | updateVisibility(); | ||
1202 | if (!deleting) { | | |||
1203 | if (isDecorated()) { | | |||
1204 | decoratedClient()->destroyRenderer(); | | |||
1205 | } | | |||
1206 | } | | |||
1207 | // for safety in case KWin is just resizing the window | 1203 | // for safety in case KWin is just resizing the window | ||
1208 | resetHaveResizeEffect(); | 1204 | resetHaveResizeEffect(); | ||
1209 | } | 1205 | } | ||
1210 | 1206 | | |||
1211 | } // namespace | 1207 | } // namespace |