8.4 Sending Events
XSendEvent() function may be used to send a
ClientMessage event or any other event type to a
particular window, to the current keyboard focus window, or to the
window in which the pointer is located. Sending events is necessary in
selection processing, as described in 12.4 Selections. It
may also be useful for designing test procedures for your input handling
or for making demonstration programs that simulate user input.
send_event member of each event structure
indicates the origin of the event. If
True, it was
sent from another client rather from the server. Note that, unless this
flag is explicitly checked, events from the server and from other
clients will appear the same to your application.