[RFC] protocol: Introduce logical surface protocol

John Kåre Alsaker john.kare.alsaker at gmail.com
Sun Mar 17 03:47:40 PDT 2013


I believe this is the wrong approach. I'd rather see some generic way
to share any wl_object between clients securely. I don't see a
transfer of ownership of your handle which means any client and get
access to it.

I'd rather have something like this:
<request name="share_object">
  <arg name="object" type="object" />
  <arg name="target" type="int" />
  <arg name="data" type="array" />
</request>

<event name="receive_object">
  <arg name="object" type="object"/>
  <arg name="sender" type="int"/>
  <arg name="interface" type="string"/>
  <arg name="data" type="array"/>
</event>

One connection uses share_object to send a wl_object and some
associated data so it knows what to do with it. The target can be some
unique identifier of a connection to the compositor. The other
connection receives the object with receive_object. It has the unique
identifier of the sender and the interface type so it knows which type
the object it. It can look at the data argument to find out what the
sender want you to do with the object. If the client doesn't want to
use the object, it should just delete it.

There's probably some details regarding interfaces and version that
needs to be worked out for this to work.


More information about the wayland-devel mailing list