[PATCH 2/3] weston:Add wl_output name event

Quanxian Wang quanxian.wang at intel.com
Tue Mar 18 22:30:47 PDT 2014


Signed-off-by: Quanxian Wang <quanxian.wang at intel.com>
---
 src/compositor.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/compositor.c b/src/compositor.c
index 40e4b11..78e2b48 100644
--- a/src/compositor.c
+++ b/src/compositor.c
@@ -3115,7 +3115,7 @@ bind_output(struct wl_client *client,
 	struct wl_resource *resource;
 
 	resource = wl_resource_create(client, &wl_output_interface,
-				      MIN(version, 2), id);
+				      MIN(version, 3), id);
 	if (resource == NULL) {
 		wl_client_post_no_memory(client);
 		return;
@@ -3144,6 +3144,9 @@ bind_output(struct wl_client *client,
 				    mode->refresh);
 	}
 
+	if (version >= 3)
+		wl_output_send_name(resource, output->name);
+
 	if (version >= 2)
 		wl_output_send_done(resource);
 }
@@ -3400,7 +3403,7 @@ weston_output_init(struct weston_output *output, struct weston_compositor *c,
 	output->compositor->output_id_pool |= 1 << output->id;
 
 	output->global =
-		wl_global_create(c->wl_display, &wl_output_interface, 2,
+		wl_global_create(c->wl_display, &wl_output_interface, 3,
 				 output, bind_output);
 	wl_signal_emit(&c->output_created_signal, output);
 }
-- 
1.8.1.2



More information about the wayland-devel mailing list