plugins/screentransform: Stop tracking disabled outputs

If an output is disabled, the Output object will be kept alive. That
means that the aboutToChange connection will be kept.

If the output is enabled again and its transform changes, its contents
will be captured more than once.

In order to fix, the screentransform plugin has to break the
aboutToChange connection.
This commit is contained in:
Vlad Zahorodnii 2023-12-14 10:31:03 +02:00 committed by David Edmundson
parent 1f5fb58d23
commit b476d7f4c0

View file

@ -112,6 +112,7 @@ void ScreenTransformEffect::addScreen(Output *screen)
void ScreenTransformEffect::removeScreen(Output *screen)
{
screen->disconnect(this);
if (auto it = m_states.find(screen); it != m_states.end()) {
effects->makeOpenGLContextCurrent();
m_states.erase(it);