I am trying to monitor events sent to a widget owned by another
process.
I know the process sends ClientMessage Events to the widget using
XSendEvent() like this:

XEvent e;
e.xclient.message_type=ClientMessage;
....
XSendEvent(display,widget,0,0,&e);

I also know the other process uses XTAddEventHandler to capture them.


Using xev source as a guide, I have in summary -
Found window id (used xwininfo to verify)
Use XSelectInput() and XNextEvent to see events.

While I can see events generated by clicking or moving the window, I
cannot see these client messages.
Is this even possible? Am I missing something?