[comp.windows.x] moving pointer in X.

thender@uxh.cso.uiuc.edu (Todd Henderson) (03/30/91)

Howdy group,

  I have a couple of naive questions to ask.  Excuse their ignorance.
I am using a HP 400s workstation.  I am working on a graphics code where
I am using several windows.  I know the names of the windows because 
I created them with 'xwcreate'.  I would like to be able to move the
pointer from window to window.  i.e. after something happens in one
window the pointer should move to the other window.  Can this be done
in X.  I am programming the graphics in Starbase from HP.  I do not have
access to any manuals concerning programming in X.  This is why the net
got the question.

  If the answer to the above is yes.  What is the function call I need?


  Thanks in advance for any and all help.  Please send email to:


hender@uicfdc.aae.uiuc.edu


  Thanks
  Todd

ps.  if this is the wrong group for this let me know.  thanks.

I'm sure that most of the software and hardware I referred to above is
a registered trademark of someone.  They deserve the credit, good or bad.

mouse@lightning.mcrcim.mcgill.EDU (der Mouse) (04/02/91)

> I would like to be able to move the pointer from window to window.
> i.e. after something happens in one window the pointer should move to
> the other window.  Can this be done in X.

(Questions generally end with `?' rather than `.'.)

Certainly you can move the pointer: just put your hand out and push the
little thingy on your desk.... :-)

Yes, it can.  The XWarpPointer call does this.

However, using it is discouraged - for good reason.

Why do you think you want the pointer to teleport over to the other
window?  What are you trying to accomplish by doing this?  Whatever it
is, warping the pointer is probably[%] not the best way to do it.

[%] Probably, not certainly.  Sometimes using XWarpPointer is actually
    the Right Thing, though those times are rare.

> I do not have access to any manuals concerning programming in X.

You actually do, you just don't know it :-)

The entire R4 distribution, including documentation, is available for
FTP.  If you don't want the whole thing, I have various pieces of the
doc/ directory unpacked and ASCIIified and up for ftp on 132.206.1.1 in
X/ as well (look for things like Xlib.doc and Protocol.doc).

					der Mouse

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