Store the mouse cursor in the ConnParams object
Like we do for everything else. This also gets rid
of the callback, which is a bit out of place
compared to everything else.
diff --git a/common/rfb/ConnParams.cxx b/common/rfb/ConnParams.cxx
index 6fd6668..36f6daa 100644
--- a/common/rfb/ConnParams.cxx
+++ b/common/rfb/ConnParams.cxx
@@ -86,6 +86,21 @@
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;