Discard all deleted before constructing the Scene

The Scene connects to the deletedRemoved signal and tries to remove the
Deleted from it's list of Windows, which will fail because a SceneWindow
doesn't get created for an existing Deleted in the Scene setup.

It doesn't make sense to create a SceneWindow for a Deleted as there is
no pixmap around anyway. Thus the best approach is to ensure that there
are no Deleted by just discarding all prior to creating the Scene.

BUG: 333275
REVIEW: 117557
This commit is contained in:
Martin Gräßlin 2014-04-14 09:19:43 +02:00
parent ad7e1f6260
commit 8e63102855

View file

@ -175,6 +175,12 @@ void Compositor::slotCompositingOptionsInitialized()
cm_selection->claim(true); // force claiming
cm_selection->owning = true;
}
// There might still be a deleted around, needs to be cleared before creating the scene (BUG 333275)
while (!Workspace::self()->deletedList().isEmpty()) {
Workspace::self()->deletedList().first()->discard();
}
switch(options->compositingMode()) {
case OpenGLCompositing: {
qDebug() << "Initializing OpenGL compositing";