[PATCH v2 wayland 2/2] protocol: Make it clear that returned "one-shot" objects are destroyed

Rob Bradford robert.bradford at intel.com
Fri Feb 8 07:11:41 PST 2013


From: Rob Bradford <rob at linux.intel.com>

The objects returned by the frame and sync request are destroyed by the
compositor after the "done" event on the wl_callback interface is fired.
---
 protocol/wayland.xml | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/protocol/wayland.xml b/protocol/wayland.xml
index c4673e5..7e4bff4 100644
--- a/protocol/wayland.xml
+++ b/protocol/wayland.xml
@@ -39,6 +39,10 @@
 	on the provided wl_callback object.  Since requests are
 	handled in-order, this can be used as a barrier to ensure all
 	previous requests have been handled.
+
+	The object returned by this request will be destroyed
+	by the compositor after the callback is fired and as such the client
+	must not attempt to use it after that point.
       </description>
       <arg name="callback" type="new_id" interface="wl_callback"/>
     </request>
@@ -856,7 +860,9 @@
 	for throttling redrawing operations, and driving animations.
 	The frame request will take effect on the next wl_surface.commit.
 	The notification will only be posted for one frame unless
-	requested again.
+	requested again. The object returned by this request will be destroyed
+	by the compositor after the callback is fired and as such the client
+	must not attempt to use it after that point.
 
 	A server should avoid signalling the frame callbacks if the
 	surface is not visible in any way, e.g. the surface is off-screen,
-- 
1.8.1



More information about the wayland-devel mailing list