Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion common/rfb/EncodeManager.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -365,8 +365,21 @@ void EncodeManager::writeLosslessRefresh(const Region& req, const ScreenSet &la
const RenderedCursor* renderedCursor,
size_t maxUpdateSize)
{
if (videoDetected || video_mode_available)
if (videoDetected || video_mode_available) {
// In video mode there's no lossless refresh to send, but pending
// pseudo-encodings (cursor shape, LED state, etc.) must still be
// flushed — otherwise the cursor shape lags whenever the desktop
// is idle (e.g. user hovering a window edge to resize). Without
// this, writeFramebufferUpdate() reaches us via writeDataUpdate's
// "ui.is_empty() but needFakeUpdate()" branch and we early-return,
// never emitting the FBU that would carry the pseudo-rects.
if (conn->writer()->needFakeUpdate()) {
int nRects = conn->cp.supportsLastRect ? 0xFFFF : 0;
conn->writer()->writeFramebufferUpdateStart(nRects);
conn->writer()->writeFramebufferUpdateEnd();
}
return;
}

doUpdate(false, getLosslessRefresh(req, maxUpdateSize),
Region(), Point(), std::vector<CopyPassRect>(), layout, pb, renderedCursor);
Expand Down