[comp.windows.x] Using XDefineCursor properly....

morreale@bierstadt.scd.ucar.edu (Peter Morreale) (11/26/90)

During the course of a cpu intensive callback, I want to change the 
mouse pointer to XC_watch while it is in my app. 

Do I have to call XDefineCursor for every widget the pointer may travel
through?. 

Thanks,
-PWM

--
------------------------------------------------------------------
Peter W. Morreale                  email:  morreale@ncar.ucar.edu
Nat'l Center for Atmos Research    voice:  (303) 497-1293
Scientific Computing Division     

mouse@LARRY.MCRCIM.MCGILL.EDU (11/27/90)

> During the course of a cpu intensive callback, I want to change the
> mouse pointer to XC_watch while it is in my app.

> Do I have to call XDefineCursor for every widget the pointer may
> travel through?

No.  The simple solution is to create an InputOnly window which covers
your top-level window.  Give this window the cursor you want.  Then
when you want to use this cursor, map and raise this window; to go back
to normal, unmap it.  This will automatically keep you from getting
mouse events - or rather, mouse events will be generated on this window
instead of the window they "visually" belong to.  Depending on
precisely how the window manager works, it may or may not have a
similar effect on keystrokes as well.

					der Mouse

			old: mcgill-vision!mouse
			new: mouse@larry.mcrcim.mcgill.edu