From 1d7d8f0e95949ef42a22c51db37ddddbda07c686 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristian=20H=C3=B8gsberg?= Date: Tue, 25 Jun 2013 16:15:27 -0400 Subject: [PATCH] nested: Fix direct access to resource->data --- clients/nested.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/clients/nested.c b/clients/nested.c index edc09ce6..6aef9c87 100644 --- a/clients/nested.c +++ b/clients/nested.c @@ -264,9 +264,9 @@ surface_attach(struct wl_client *client, struct wl_resource *resource, struct wl_resource *buffer_resource, int32_t sx, int32_t sy) { - struct nested_surface *surface = resource->data; + struct nested_surface *surface = wl_resource_get_user_data(resource); struct nested *nested = surface->nested; - struct wl_buffer *buffer = buffer_resource->data; + struct wl_buffer *buffer = wl_resource_get_user_data(buffer_resource); EGLint format, width, height; cairo_device_t *device; @@ -338,7 +338,7 @@ surface_frame(struct wl_client *client, struct wl_resource *resource, uint32_t id) { struct nested_frame_callback *callback; - struct nested_surface *surface = resource->data; + struct nested_surface *surface = wl_resource_get_user_data(resource); struct nested *nested = surface->nested; callback = malloc(sizeof *callback); @@ -398,7 +398,7 @@ static void compositor_create_surface(struct wl_client *client, struct wl_resource *resource, uint32_t id) { - struct nested *nested = resource->data; + struct nested *nested = wl_resource_get_user_data(resource); struct nested_surface *surface; surface = malloc(sizeof *surface); @@ -449,7 +449,7 @@ static void region_add(struct wl_client *client, struct wl_resource *resource, int32_t x, int32_t y, int32_t width, int32_t height) { - struct nested_region *region = resource->data; + struct nested_region *region = wl_resource_get_user_data(resource); pixman_region32_union_rect(®ion->region, ®ion->region, x, y, width, height); @@ -459,7 +459,7 @@ static void region_subtract(struct wl_client *client, struct wl_resource *resource, int32_t x, int32_t y, int32_t width, int32_t height) { - struct nested_region *region = resource->data; + struct nested_region *region = wl_resource_get_user_data(resource); pixman_region32_t rect; pixman_region32_init_rect(&rect, x, y, width, height);