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/SMsgWriter.h b/common/rfb/SMsgWriter.h
index c3ee457..e9fc5a4 100644
--- a/common/rfb/SMsgWriter.h
+++ b/common/rfb/SMsgWriter.h
@@ -34,11 +34,6 @@
   class ConnParams;
   class ScreenSet;
 
-  class WriteSetCursorCallback {
-  public:
-    virtual void writeSetCursorCallback() = 0;
-  };
-
   class SMsgWriter {
   public:
     SMsgWriter(ConnParams* cp, rdr::OutStream* os);
@@ -81,16 +76,10 @@
 
     bool writeSetDesktopName();
 
-    // Like setDesktopSize, we can't just write out a setCursor message
-    // immediately. Instead of calling writeSetCursor() directly,
-    // you must call cursorChange(), and then invoke writeSetCursor()
-    // in response to the writeSetCursorCallback() callback. This will
-    // happen when the next update is sent.
-    void cursorChange(WriteSetCursorCallback* cb);
-    void writeSetCursor(int width, int height, const Point& hotspot,
-                        void* data, void* mask);
-    void writeSetXCursor(int width, int height, int hotspotX, int hotspotY,
-                         void* data, void* mask);
+    // Like setDesktopSize, we can't just write out a cursor message
+    // immediately. 
+    bool writeSetCursor();
+    bool writeSetXCursor();
 
     // needFakeUpdate() returns true when an immediate update is needed in
     // order to flush out pseudo-rectangles to the client.
@@ -141,6 +130,13 @@
                                       int fb_width, int fb_height,
                                       const ScreenSet& layout);
     void writeSetDesktopNameRect(const char *name);
+    void writeSetCursorRect(int width, int height,
+                            int hotspotX, int hotspotY,
+                            const void* data, const void* mask);
+    void writeSetXCursorRect(int width, int height,
+                             int hotspotX, int hotspotY,
+                             const rdr::U8 pix0[], const rdr::U8 pix1[],
+                             const void* data, const void* mask);
 
     ConnParams* cp;
     rdr::OutStream* os;
@@ -150,12 +146,12 @@
     int nRectsInUpdate;
     int nRectsInHeader;
 
-    WriteSetCursorCallback* wsccb;
-
     bool needSetDesktopSize;
     bool needExtendedDesktopSize;
     bool needSetDesktopName;
     bool needLastRect;
+    bool needSetCursor;
+    bool needSetXCursor;
 
     int lenBeforeRect;
     int updatesSent;