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:
parent
f91271b29e
commit
0dffc569ea
1 changed files with 6 additions and 0 deletions
|
@ -83,6 +83,9 @@ void SurfaceInterfacePrivate::addChild(SubSurfaceInterface *child)
|
||||||
pending.children.append(child);
|
pending.children.append(child);
|
||||||
cached.children.append(child);
|
cached.children.append(child);
|
||||||
current.children.append(child);
|
current.children.append(child);
|
||||||
|
|
||||||
|
child->surface()->setOutputs(outputs);
|
||||||
|
|
||||||
emit q->childSubSurfaceAdded(child);
|
emit q->childSubSurfaceAdded(child);
|
||||||
emit q->subSurfaceTreeChanged();
|
emit q->subSurfaceTreeChanged();
|
||||||
QObject::connect(child, &SubSurfaceInterface::positionChanged, q, &SurfaceInterface::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
|
// TODO: send enter when the client binds the OutputInterface another time
|
||||||
|
|
||||||
d->outputs = outputs;
|
d->outputs = outputs;
|
||||||
|
for (auto child : d->current.children) {
|
||||||
|
child->surface()->setOutputs(outputs);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SurfaceInterface *SurfaceInterface::surfaceAt(const QPointF &position)
|
SurfaceInterface *SurfaceInterface::surfaceAt(const QPointF &position)
|
||||||
|
|
Loading…
Reference in a new issue