diff options
-rw-r--r-- | common/rfb/EncodeManager.cxx | 7 | ||||
-rw-r--r-- | common/rfb/EncodeManager.h | 2 | ||||
-rw-r--r-- | common/rfb/VNCSConnectionST.cxx | 1 |
3 files changed, 10 insertions, 0 deletions
diff --git a/common/rfb/EncodeManager.cxx b/common/rfb/EncodeManager.cxx index 7ec70e69..6a63fa6f 100644 --- a/common/rfb/EncodeManager.cxx +++ b/common/rfb/EncodeManager.cxx @@ -278,6 +278,13 @@ void EncodeManager::pruneLosslessRefresh(const core::Region& limits) pendingRefreshRegion.assign_intersect(limits); } +void EncodeManager::forceRefresh(const core::Region& req) +{ + lossyRegion.assign_union(req); + if (!recentChangeTimer.isStarted()) + pendingRefreshRegion.assign_union(req); +} + void EncodeManager::writeUpdate(const UpdateInfo& ui, const PixelBuffer* pb, const RenderedCursor* renderedCursor) { diff --git a/common/rfb/EncodeManager.h b/common/rfb/EncodeManager.h index 959c13d6..4ce6d0ce 100644 --- a/common/rfb/EncodeManager.h +++ b/common/rfb/EncodeManager.h @@ -54,6 +54,8 @@ namespace rfb { void pruneLosslessRefresh(const core::Region& limits); + void forceRefresh(const core::Region& req); + void writeUpdate(const UpdateInfo& ui, const PixelBuffer* pb, const RenderedCursor* renderedCursor); diff --git a/common/rfb/VNCSConnectionST.cxx b/common/rfb/VNCSConnectionST.cxx index 0b3537ad..0038daff 100644 --- a/common/rfb/VNCSConnectionST.cxx +++ b/common/rfb/VNCSConnectionST.cxx @@ -467,6 +467,7 @@ void VNCSConnectionST::setPixelFormat(const PixelFormat& pf) pf.print(buffer, 256); vlog.info("Client pixel format %s", buffer); setCursor(); + encodeManager.forceRefresh(server->getPixelBuffer()->getRect()); } void VNCSConnectionST::pointerEvent(const core::Point& pos, |