<div dir="ltr"><div>Looks good to me.<br><br></div>Reviewed-By: Jason Ekstrand <<a href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a>><br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, May 19, 2014 at 12:27 PM, Neil Roberts <span dir="ltr"><<a href="mailto:neil@linux.intel.com" target="_blank">neil@linux.intel.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">The wl_output.release request is now handled. It just causes the<br>
resource to be destroyed. This is also set as the destructor when<br>
zombifying the resource.<br>
---<br>
 src/compositor.c | 23 +++++++++++++++++++----<br>
 1 file changed, 19 insertions(+), 4 deletions(-)<br>
<br>
diff --git a/src/compositor.c b/src/compositor.c<br>
index ea0c9b4..f9bd25b 100644<br>
--- a/src/compositor.c<br>
+++ b/src/compositor.c<br>
@@ -3038,6 +3038,18 @@ weston_compositor_stack_plane(struct weston_compositor *ec,<br>
                wl_list_insert(&ec->plane_list, &plane->link);<br>
 }<br>
<br>
+static void<br>
+output_release(struct wl_client *client,<br>
+              struct wl_resource *resource)<br>
+{<br>
+       wl_resource_destroy(resource);<br>
+}<br>
+<br>
+static struct wl_output_interface<br>
+output_interface = {<br>
+       output_release<br>
+};<br>
+<br>
 static void unbind_resource(struct wl_resource *resource)<br>
 {<br>
        wl_list_remove(wl_resource_get_link(resource));<br>
@@ -3052,14 +3064,15 @@ bind_output(struct wl_client *client,<br>
        struct wl_resource *resource;<br>
<br>
        resource = wl_resource_create(client, &wl_output_interface,<br>
-                                     MIN(version, 2), id);<br>
+                                     MIN(version, 3), id);<br>
        if (resource == NULL) {<br>
                wl_client_post_no_memory(client);<br>
                return;<br>
        }<br>
<br>
        wl_list_insert(&output->resource_list, wl_resource_get_link(resource));<br>
-       wl_resource_set_implementation(resource, NULL, data, unbind_resource);<br>
+       wl_resource_set_implementation(resource, &output_interface,<br>
+                                      data, unbind_resource);<br>
<br>
        wl_output_send_geometry(resource,<br>
                                output->x,<br>
@@ -3159,7 +3172,9 @@ weston_output_destroy(struct weston_output *output)<br>
        wl_global_destroy(output->global);<br>
<br>
        wl_resource_for_each_safe(resource, tmp, &output->resource_list)<br>
-               weston_resource_zombify(resource, ~0);<br>
+               weston_resource_zombify(resource,<br>
+                                       WL_REQUEST_OPCODE(wl_output_interface,<br>
+                                                         release));<br>
 }<br>
<br>
 static void<br>
@@ -3357,7 +3372,7 @@ weston_output_init(struct weston_output *output, struct weston_compositor *c,<br>
        output->compositor->output_id_pool |= 1 << output->id;<br>
<br>
        output->global =<br>
-               wl_global_create(c->wl_display, &wl_output_interface, 2,<br>
+               wl_global_create(c->wl_display, &wl_output_interface, 3,<br>
                                 output, bind_output);<br>
        wl_signal_emit(&c->output_created_signal, output);<br>
 }<br>
<span class="HOEnZb"><font color="#888888">--<br>
1.9.0<br>
<br>
_______________________________________________<br>
wayland-devel mailing list<br>
<a href="mailto:wayland-devel@lists.freedesktop.org">wayland-devel@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/wayland-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/wayland-devel</a><br>
</font></span></blockquote></div><br></div>