When I'm create custom AWT cursors, it seems that they get the wrong hotspot when running on Windows Vista or Windows 7 -- the hotspot is offset by a few pixels to the right and down. On Windows XP and on Linux with X.org, I'm not seeing the problem at all. Is this a bug, or am I just doing something weird?
I'm creating the cursors with this function:
private static Cursor makeawtcurs(BufferedImage img, Coord hs) {
java.awt.Dimension cd = Toolkit.getDefaultToolkit().getBestCursorSize(img.getWidth(), img.getHeight());
BufferedImage buf = TexI.mkbuf(new Coord((int)cd.getWidth(), (int)cd.getHeight()));
java.awt.Graphics g = buf.getGraphics();
g.drawImage(img, 0, 0, null);
g.dispose();
return(Toolkit.getDefaultToolkit().createCustomCursor(buf, new java.awt.Point(hs.x, hs.y), ""));
}