When a cursor's hotspot does not lie on a visible pixel and so ends upD
outside the bounding rectangle for it, the cursor is cropped and the
hotspot may end up being changed incorrectly.  In particular, if the
hotspot is to the left or above the first "busy" pixel, the
transmitted hotspot ends up with a very large coordinate (like 65535),
and can cause crashes in 4.0beta4.

There seems to be a work-around for this in the viewer code for
4.0beta5, in that cursors with invalid hotspots are discarded.

Here is the fix for the real problem.

Tim.
*/

--- vnc-4.0b5-unixsrc/rfb/Cursor.cxx.hotspot    2004-05-28 16:12:17.335956398 +0100
+++ vnc-4.0b5-unixsrc/rfb/Cursor.cxx    2004-05-28 16:13:01.779459058 +0100
@@ -134,6 +134,10 @@
         if (y < busy.tl.y) busy.tl.y = y;
         if (y+1 > busy.br.y) busy.br.y = y+1;
       }
+      if (hotspot.x < busy.tl.x) busy.tl.x = hotspot.x;
+      if (hotspot.x + 1 > busy.br.x) busy.br.x = hotspot.x + 1;
+      if (hotspot.y < busy.tl.y) busy.tl.y = hotspot.y;
+      if (hotspot.y + 1 > busy.br.y) busy.br.y = hotspot.y + 1;
     }
   }
   if (busy.tl.x > busy.br.x) busy.clear();
_______________________________________________
VNC-List mailing list
[EMAIL PROTECTED]
To remove yourself from the list visit:
http://www.realvnc.com/mailman/listinfo/vnc-list

Reply via email to