plugins/screencast: fix the cursor being offset after changing the scale

When the scale of a screen is changed, the cursor parameters have to be
adjusted or the client will render it offset to the actual cursor
This commit is contained in:
Xaver Hugl 2024-03-11 23:46:51 +01:00
parent 2c7301b3ee
commit 3a55351211

View file

@ -156,6 +156,9 @@ void ScreencastManager::streamOutput(ScreencastStreamV1Interface *waylandStream,
stream->recordFrame(scaleRegion(damagedRegion, streamOutput->scale()));
}
};
connect(streamOutput, &Output::changed, stream, [streamOutput, stream, mode]() {
stream->setCursorMode(mode, streamOutput->scale(), streamOutput->geometry());
});
connect(stream, &ScreenCastStream::startStreaming, waylandStream, [streamOutput, stream, bufferToStream] {
Compositor::self()->scene()->addRepaint(streamOutput->geometry());
connect(streamOutput, &Output::outputChange, stream, bufferToStream);