Hi,
I'm afraid this would be a OT for this list, but I don't know a proper list for this kind of question.
When I am going to setting up a interface between two X client to communicate, I found that, there is actually two mechanism available. But I don't know about their pros and cons.. Hence anyone can share some advice with me?
The two mechanism is
1. Using selection, SetSelectionOwner, Selection{Clear,Request,Notify} to communicate.
2. Use XSendEvent with event type = ClientMessage to communicate.
It seems that, selection is a must to for both side to know each other window id, but after acquiring a window id, there communication can then achieved by 'client message' OR 'selection convert' mechanism. And using client messages seems less expensive, as message is just sent to recipient with a window id, while using selection convert needs a few rounds of message.
On the other, in X lib programming manual, it doesn't talk a lot about the 2nd approach. It only state that, 'Selection' is an important mechanism to achieve Inter client communication.
Would anyone clear up my mind??
Regards,
Zarick Lau