[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Changing cursor appearance with Xlib
>Is there a way to change the cursor in Xlib? I'm trying to get an image to
>follow the mouse but the best solution I've found so far is to blit the image
>-10, -10 of the cursor's x,y. This to me is dodgy and a lot more work...
>
>Is there another way? Please enlighten me :)
Yes there is.
XCreatePixmapCursor will make a cursor from an image - it includes the ability
to specify the hot-spot within the image, which would be 10,10 in this case.
XDefineCursor sets the cursor for a window.
It is, however limited to two colours plus transparency.