[cogl/cogl-1.16] cogland: Embed the wl_surface struct directly into CoglandSurface



commit f002e4e78fb311442ea2dcf3ce3cdd643d86cecb
Author: Neil Roberts <neil linux intel com>
Date:   Fri May 10 17:12:00 2013 +0100

    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)

 examples/cogland.c |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/examples/cogland.c b/examples/cogland.c
index 029f39b..50811ad 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;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]