From fd07fb76bcc737b9e11583df8bf89fe2806d3523 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Kristian=20H=C3=B8gsberg?= Date: Mon, 29 Aug 2011 15:03:09 -0400 Subject: [PATCH] Create resource for wl_output --- compositor/compositor.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/compositor/compositor.c b/compositor/compositor.c index 856eb29..93e5eea 100644 --- a/compositor/compositor.c +++ b/compositor/compositor.c @@ -1666,10 +1666,12 @@ bind_output(struct wl_client *client, { struct wlsc_output *output = data; struct wlsc_mode *mode; + struct wl_resource *resource; + + resource = wl_client_add_object(client, + &wl_output_interface, NULL, id, data); - output->resource.client = client; - output->resource.object.id = id; - wl_resource_post_event(&output->resource, + wl_resource_post_event(resource, WL_OUTPUT_GEOMETRY, output->x, output->y, @@ -1679,7 +1681,7 @@ bind_output(struct wl_client *client, output->make, output->model); wl_list_for_each (mode, &output->mode_list, link) { - wl_resource_post_event(&output->resource, + wl_resource_post_event(resource, WL_OUTPUT_MODE, mode->flags, mode->width, -- 2.7.4