summaryrefslogtreecommitdiffstats
path: root/common/rfb/ConnParams.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'common/rfb/ConnParams.cxx')
-rw-r--r--common/rfb/ConnParams.cxx15
1 files changed, 15 insertions, 0 deletions
diff --git a/common/rfb/ConnParams.cxx b/common/rfb/ConnParams.cxx
index 6fd6668e..36f6daa6 100644
--- a/common/rfb/ConnParams.cxx
+++ b/common/rfb/ConnParams.cxx
@@ -86,6 +86,21 @@ void ConnParams::setName(const char* name)
name_ = strDup(name);
}
+void ConnParams::setCursor(const Cursor& other)
+{
+ const rdr::U8* data;
+ int stride;
+
+ cursor_.hotspot = other.hotspot;
+ cursor_.setPF(other.getPF());
+ cursor_.setSize(other.width(), other.height());
+
+ data = other.getBuffer(other.getRect(), &stride);
+ cursor_.imageRect(cursor_.getRect(), data, stride);
+
+ memcpy(cursor_.mask.buf, other.mask.buf, cursor_.maskLen());
+}
+
void ConnParams::setEncodings(int nEncodings, const rdr::S32* encodings)
{
useCopyRect = false;