Notify subsurfaces about output changes

Otherwise they wouldn't notice and wouldn't update to the settings of
the new output, like the new output's scaling.
This commit is contained in:
Aleix Pol 2020-11-16 17:21:43 +01:00 committed by Aleix Pol Gonzalez
parent f91271b29e
commit 0dffc569ea

View file

@ -83,6 +83,9 @@ void SurfaceInterfacePrivate::addChild(SubSurfaceInterface *child)
pending.children.append(child);
cached.children.append(child);
current.children.append(child);
child->surface()->setOutputs(outputs);
emit q->childSubSurfaceAdded(child);
emit q->subSurfaceTreeChanged();
QObject::connect(child, &SubSurfaceInterface::positionChanged, q, &SurfaceInterface::subSurfaceTreeChanged);
@ -850,6 +853,9 @@ void SurfaceInterface::setOutputs(const QVector<OutputInterface *> &outputs)
// TODO: send enter when the client binds the OutputInterface another time
d->outputs = outputs;
for (auto child : d->current.children) {
child->surface()->setOutputs(outputs);
}
}
SurfaceInterface *SurfaceInterface::surfaceAt(const QPointF &position)