From 0ef12b69a110848b7711bb5d70f2729c96894872 Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Fri, 22 Apr 2022 18:26:26 +0300 Subject: [PATCH] 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. --- src/plugins/screencast/screencastmanager.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/plugins/screencast/screencastmanager.cpp b/src/plugins/screencast/screencastmanager.cpp index 0402eddb06..694d6b4ab2 100644 --- a/src/plugins/screencast/screencastmanager.cpp +++ b/src/plugins/screencast/screencastmanager.cpp @@ -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());