diff options
Diffstat (limited to 'common/rfb/VNCServerST.cxx')
-rw-r--r-- | common/rfb/VNCServerST.cxx | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/common/rfb/VNCServerST.cxx b/common/rfb/VNCServerST.cxx index f1e378ed..27eb605a 100644 --- a/common/rfb/VNCServerST.cxx +++ b/common/rfb/VNCServerST.cxx @@ -294,7 +294,7 @@ void VNCServerST::setPixelBuffer(PixelBuffer* pb_, const ScreenSet& layout) comparer = new ComparingUpdateTracker(pb); cursor.setPF(pb->getPF()); - renderedCursor.setPF(pb->getPF()); + renderedCursorInvalid = true; // Make sure that we have at least one screen if (screenLayout.num_screens() == 0) @@ -598,15 +598,12 @@ bool VNCServerST::checkUpdate() if (renderCursor) { Rect clippedCursorRect - = cursor.getRect(cursorTL()).intersect(pb->getRect()); + = cursor.getRect(cursorPos.subtract(cursor.hotspot)).intersect(pb->getRect()); if (!renderedCursorInvalid && (toCheck.intersect(clippedCursorRect) .is_empty())) { renderCursor = false; } else { - renderedCursorTL = clippedCursorRect.tl; - renderedCursor.setSize(clippedCursorRect.width(), - clippedCursorRect.height()); toCheck.assign_union(clippedCursorRect); } } @@ -622,17 +619,7 @@ bool VNCServerST::checkUpdate() comparer->getUpdateInfo(&ui, pb->getRect()); if (renderCursor) { - const rdr::U8* buffer; - int stride; - - buffer = pb->getBuffer(renderedCursor.getRect(renderedCursorTL), &stride); - renderedCursor.imageRect(renderedCursor.getRect(), buffer, stride); - - buffer = cursor.getBuffer(cursor.getRect(), &stride); - renderedCursor.maskRect(cursor.getRect(cursorTL() - .subtract(renderedCursorTL)), - buffer, cursor.mask.buf); - + renderedCursor.update(pb, &cursor, cursorPos); renderedCursorInvalid = false; } |