8.4 Sending Events

The 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.

The 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.

Get XLIB Programming Manual, Rel. 5, Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.