[comp.windows.x] Sending ButtonPress events query

ALISTAIR@mits.com.au (10/24/90)

I am currently trying to write a program which will emulate the mouse
(amongst other things), however I have not been able to successfully send
button press events to windows created with anything other than Xlib.  So
far I've tried using PointerWindow, InputFocus, and tracking down through
child windows, as the window id to XSendEvent, all to no avail.  Could some
kind soul please explain what I am doing wrong (or even send me a piece of
sample code to do this :-)).

I'll summarise mail to the net.  I am running DECwindows on a VAXstation
3100-38 SPX under VMS 5.3-1.

Thanks in advance,

Alistair Grant

Internet:     alistair@mits.com.au    PSI Mail:     psi%0505238730004::alistair
Alternate:    alistair%mits.com.au@ucsvc.ucs.unimelb.edu.au
              grant@decus.com.au
Phone:        +61 3 615 4641	      Fax:          +61 3 615 4408

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

> I am currently trying to write a program which will emulate the mouse
> (amongst other things), however I have not been able to successfully
> send button press events to windows created with anything other than
> Xlib.

If I had to guess, I would guess that you are sending the events just
fine, but the Xt code is ignoring them.  Your Xlib code for handling
events almost certainly ignores the send_event field, but I think that
unless you specifically direct otherwise, Xt ignores "counterfeit"
keyboard and pointer events.

I don't know how to make Xt listen to synthetic keyboard and pointer
events, but if this is your problem you may be able to find some way
around it.  (I seem to recall that xterm has a resource to control
this, something like a sendEvent resource; perhaps this is actually an
Xt thing instead?)

					der Mouse

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