Inter-client Communication
The X Window core protocol provides mechanisms for communication between clients: window properties and events, in particular the client-to-client message events. However, it does not specify any protocol for such interactions. Instead, a separate set of inter-client communication conventions governs these protocols.
The Inter-Client Communication Conventions Manual specifies the protocol for the exchange of data via selections and the interaction of applications with the window manager. Some have considered this specification difficult and confusing; consistency of application look and feel and communication is typically addressed by programming to a given desktop environment.
The Inter-Client Exchange protocol (ICE) specifies a framework for building protocols for interaction between clients, so that programmers can build a specific protocol on top of it. In particular, the X Session Management protocol (XSMP) is a protocol based on ICE that governs the interaction between applications with the session manager, which is the program that takes care of storing the status of the desktop at the end of an interactive session and recovering it when another session with the same user is started again.
The freedesktop specifications include newer conventions, including the drag-and-drop convention Xdnd (used for transferring data by selecting it and dragging in another window) and the embedded application convention Xembed (which details how an application can run in a subwindow of another application).
Read more about this topic: X Window System Protocols And Architecture