When using vncv on a terminal with software cursor (vesa, rpi) the
mouse cursor leaves a trail.  This seem to be caused by the fact that
vncv loads picture updates with loadimage(2) directly to screen.
Loading to an offscreen image followed by a draw(2) to screen removes
the artifact:

/n/dump/2013/0507/sys/src/cmd/vnc/draw.c:106,111 -
/sys/src/cmd/vnc/draw.c:106,112
  static void
  updatescreen(Rectangle r)
  {
+ Image* img;
  int b, bb;

  lockdisplay(display);
/n/dump/2013/0507/sys/src/cmd/vnc/draw.c:120,129 -
/sys/src/cmd/vnc/draw.c:121,135
  /*
  * assume load image fails only because of resize
  */
+ img = allocimage(display, r, screen->chan, 0, DNofill);
+ if(img == nil)
+ sysfatal("updatescreen: %r");
  b = Dx(r) * pixb * Dy(r);
- bb = loadimage(screen, rectaddpt(r, screen->r.min), pixbuf, b);
+ bb = loadimage(img, r, pixbuf, b);
  if(bb != b && verbose)
  fprint(2, "loadimage %d on %R for %R returned %d: %r\n", b,
rectaddpt(r, screen->r.min), screen->r, bb);
+ draw(screen, rectaddpt(r, screen->r.min), img, nil, r.min);
+ freeimage(img);
  unlockdisplay(display);
  }

Submitted as /n/sources/patch/vncv-curtrail
--
- Yaroslav

Reply via email to