I've been studying the XEmbed protocol specification, as well as Gtk reference manual, but I'm having some difficulty. I'm using Gtk+ 3. I've created a Gtk socket, got its window ID, but that's where I'm stuck. I'm using C. If I understand this correctly, the program I'm writing that contains the socket, which I'll call app A, sends the window ID of the socket to app B, which has the menu bar widget that should be embedded into app A, and puts the widget into a plug, then app A calls XReparentWindow(), which begins the XEmbed protocol. Please correct me if I'm wrong.

However, I'm confused. How does app B get app A's socket ID? Does app A have to go through the window manager, or does it communicate directly with app B? It should be the active app/window (no sense in displaying a menu from a minimized or inactive window).

Thanks in advance, I appreciate it.