plugins/screencast: Avoid damaging full screen on rotated outputs

Not sure what that check is for, but things should work as expected even
without it.
This commit is contained in:
Vlad Zahorodnii 2022-04-22 18:26:26 +03:00
parent 5368537981
commit 0ef12b69a1

View file

@ -130,14 +130,10 @@ void ScreencastManager::streamOutput(KWaylandServer::ScreencastStreamV1Interface
auto stream = new ScreenCastStream(new OutputScreenCastSource(streamOutput), this);
stream->setObjectName(streamOutput->name());
stream->setCursorMode(mode, streamOutput->scale(), streamOutput->geometry());
auto bufferToStream = [streamOutput, stream](const QRegion &damagedRegion) {
if (damagedRegion.isEmpty()) {
return;
auto bufferToStream = [stream](const QRegion &damagedRegion) {
if (!damagedRegion.isEmpty()) {
stream->recordFrame(damagedRegion);
}
const QRect frame({}, streamOutput->modeSize());
const QRegion region = streamOutput->pixelSize() != streamOutput->modeSize() ? frame : damagedRegion;
stream->recordFrame(region);
};
connect(stream, &ScreenCastStream::startStreaming, waylandStream, [streamOutput, stream, bufferToStream] {
Compositor::self()->scene()->addRepaint(streamOutput->geometry());