kall@mayo.EDU (Bruce Kall) (04/13/91)
System: Sun 4/330, Openwindows. Has anybody noticed on their system that XQueryCursor returns the right-hand side of your cursor as the x,y location instead of it's hot-spot?? This happens with the standard Sun cursor (pointer towards 10 o'clock) as well as when changing to XC_tcross with XDefineCursor. I'm assuming I'm not changing the hot spot by the following: cross_hair_cursor = XCreateFontCursor(the_display,XC_tcross); XDefineCursor(the_display, window, cross_hair_cursor); Getting the x,y through a ButtonPress event via XNextEvent DOES give the hot spot. \------------------------------------------------------------\ \ Bruce Kall \ Internet: Kall@Mayo.edu \ \ Mayo Clinic (Foundation) \ Phone: (507)-255-4768 \ \ Rochester, MN 55905 \ \ \------------------------------------------------------------\
mouse@lightning.mcrcim.mcgill.EDU (der Mouse) (04/13/91)
> Subject: QueryPoint doesnt return Hot spot As far as I can tell there is no such thing as QueryPoint. > Has anybody noticed on their system that XQueryCursor returns the > right-hand side of your cursor as the x,y location instead of it's > hot-spot?? As far as I can tell there is no such thing as XQueryCursor either. The only thing I can think of that makes any sense is XQueryPointer, and I haven't seen anything wrong with that. > This happens with the standard Sun cursor (pointer towards 10 > o'clock) as well as when changing to XC_tcross with XDefineCursor. > I'm assuming I'm not changing the hot spot by the following: > cross_hair_cursor = XCreateFontCursor(the_display,XC_tcross); > XDefineCursor(the_display, window, cross_hair_cursor); "The hotspot comes from the information stored in the cursor font.", according to the Xlib document. As far as I can tell there is no way to change the hot-spot of a cursor once it's created, so the hot-spot should be correct. If you can reduce it to a small sample program, I'd be glad to try it here, and see if I can see anything wrong.... der Mouse old: mcgill-vision!mouse new: mouse@larry.mcrcim.mcgill.edu