summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorNeil Roberts <neil@linux.intel.com>2013-05-10 17:12:00 +0100
committerNeil Roberts <neil@linux.intel.com>2013-05-13 17:32:34 +0100
commitf002e4e78fb311442ea2dcf3ce3cdd643d86cecb (patch)
treed150417d5ea032d23c4f4416176bad79e6907748 /examples
parent32a0f88b04c63924eb6428d3847d9fb9aec179ae (diff)
cogland: Embed the wl_surface struct directly into CoglandSurface
The wl_surface struct has been removed from libwayland-server so instead we can just embed its only memeber, the resource, directly into CoglandSurface. http://cgit.freedesktop.org/wayland/wayland/commit/?id=508dd69b5654 https://bugzilla.gnome.org/show_bug.cgi?id=700088 Reviewed-by: Robert Bragg <robert@linux.intel.com> (cherry picked from commit 15c58ce03ce97df659dade0e10be7807eb7b2296)
Diffstat (limited to 'examples')
-rw-r--r--examples/cogland.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/examples/cogland.c b/examples/cogland.c
index 029f39b0..50811adb 100644
--- a/examples/cogland.c
+++ b/examples/cogland.c
@@ -25,7 +25,7 @@ typedef struct
{
CoglandCompositor *compositor;
- struct wl_surface wayland_surface;
+ struct wl_resource resource;
int x;
int y;
struct wl_buffer *buffer;
@@ -656,13 +656,13 @@ cogland_compositor_create_surface (struct wl_client *wayland_client,
surface->compositor = compositor;
- surface->wayland_surface.resource.destroy =
+ surface->resource.destroy =
cogland_surface_resource_destroy_cb;
- surface->wayland_surface.resource.object.id = id;
- surface->wayland_surface.resource.object.interface = &wl_surface_interface;
- surface->wayland_surface.resource.object.implementation =
+ surface->resource.object.id = id;
+ surface->resource.object.interface = &wl_surface_interface;
+ surface->resource.object.implementation =
(void (**)(void)) &cogland_surface_interface;
- surface->wayland_surface.resource.data = surface;
+ surface->resource.data = surface;
surface->buffer_destroy_listener.notify =
surface_handle_buffer_destroy;
@@ -672,7 +672,7 @@ cogland_compositor_create_surface (struct wl_client *wayland_client,
wl_list_init (&surface->pending.frame_callback_list);
region_init (&surface->pending.damage);
- wl_client_add_resource (wayland_client, &surface->wayland_surface.resource);
+ wl_client_add_resource (wayland_client, &surface->resource);
compositor->surfaces = g_list_prepend (compositor->surfaces,
surface);
@@ -993,7 +993,7 @@ get_shell_surface (struct wl_client *client,
shell_surface->surface = surface;
shell_surface->surface_destroy_listener.notify = shell_handle_surface_destroy;
- wl_signal_add (&surface->wayland_surface.resource.destroy_signal,
+ wl_signal_add (&surface->resource.destroy_signal,
&shell_surface->surface_destroy_listener);
surface->has_shell_surface = TRUE;