|
|
|
@ -74,6 +74,7 @@ void SurfaceInterfacePrivate::addChild(SubSurfaceInterface *child)
|
|
|
|
|
current.above.append(child);
|
|
|
|
|
child->surface()->setOutputs(outputs);
|
|
|
|
|
child->surface()->setPreferredBufferScale(preferredBufferScale);
|
|
|
|
|
child->surface()->setPreferredBufferTransform(preferredBufferTransform);
|
|
|
|
|
|
|
|
|
|
Q_EMIT q->childSubSurfaceAdded(child);
|
|
|
|
|
Q_EMIT q->childSubSurfacesChanged();
|
|
|
|
@ -1119,6 +1120,10 @@ void SurfaceInterface::setPreferredBufferScale(qreal scale)
|
|
|
|
|
if (d->fractionalScaleExtension) {
|
|
|
|
|
d->fractionalScaleExtension->setPreferredScale(scale);
|
|
|
|
|
}
|
|
|
|
|
if (d->resource()->version() >= WL_SURFACE_PREFERRED_BUFFER_SCALE_SINCE_VERSION) {
|
|
|
|
|
d->send_preferred_buffer_scale(std::ceil(scale));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
for (auto child : qAsConst(d->current.below)) {
|
|
|
|
|
child->surface()->setPreferredBufferScale(scale);
|
|
|
|
|
}
|
|
|
|
@ -1127,4 +1132,23 @@ void SurfaceInterface::setPreferredBufferScale(qreal scale)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void SurfaceInterface::setPreferredBufferTransform(KWin::Output::Transform transform)
|
|
|
|
|
{
|
|
|
|
|
if (transform == d->preferredBufferTransform) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
d->preferredBufferTransform = transform;
|
|
|
|
|
|
|
|
|
|
if (d->resource()->version() >= WL_SURFACE_PREFERRED_BUFFER_TRANSFORM_SINCE_VERSION) {
|
|
|
|
|
d->send_preferred_buffer_transform(uint32_t(transform));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
for (auto child : qAsConst(d->current.below)) {
|
|
|
|
|
child->surface()->setPreferredBufferTransform(transform);
|
|
|
|
|
}
|
|
|
|
|
for (auto child : qAsConst(d->current.above)) {
|
|
|
|
|
child->surface()->setPreferredBufferTransform(transform);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
} // namespace KWaylandServer
|
|
|
|
|