Embeding wingets like xembed GtkPlug / GtkSocket
Peter de Ridder
peter at xfce.org
Tue Feb 7 12:19:07 PST 2012
In Xfce we use the xembed protocol trough GtkPlug / GtkSocket. We
wonder if something similar would be possible with Wayland as well. If
it isn't possible yet would such a protocol be feasible.
We got some (wild) ideas which could give similar results to xembed
and wonder whether these are realistic.
Idea: Relative window
Let the socket side application control the position of the plug
application window. This window could be relatively positioned to the
socket application window, so any transformation in the socket
application can also be applied on the plug window. The plug window
should be drawn on top of the socket window by the compositor and
Idea: Expose area
Let the socket side application expose a part if its window to the
plug application. This way the plug application could directly render
into the socket window. The events for the exposed part should be
directed to the plug application.
Idea: Inter client windows
Share the same window between multiple clients. This way the socket
side application could copy the window into its own window. The events
need to be forwarded by the socket applications.
Idea: Shared memory
Share part of the window memory between multiple applications. Either
a subsection of the window or a window which is draw on top of the
socket side application window. The events need to be directed to the
correct process in some way.
Idea: Compositor in client
Make the socket side application a compositor which provide a file
descriptor to the plug application which gets it's window that way.
The socket application needs to implement parts to act as a
compositor. The plug client might need to handle multiple compositors
I expect the "Relative window" idea to be in line with pop up windows
and and alike and seems most realistic. I expect the "Compositor in
client" idea to need no change the Wayland protocols, but require plug
applications to support multiple compositors and socket applications
to implement composting. The other ideas need to solve the events
distribution in some way.
Peter de Ridder
More information about the wayland-devel