commit 33c7846

Michael Forney  ·  2013-09-13 07:56:59 +0000 UTC
parent f84dbfa
surface: Fix versioning
3 files changed,  +6, -4
+1, -1
1@@ -350,7 +350,7 @@ static void create_surface(struct wl_client * client,
2     output = swc_container_of(compositor->outputs.next, typeof(*output), link);
3 
4     /* Initialize surface. */
5-    surface = swc_surface_new(client, id);
6+    surface = swc_surface_new(client, wl_resource_get_version(resource), id);
7 
8     if (!surface)
9     {
+3, -2
 1@@ -338,7 +338,8 @@ static void surface_destroy(struct wl_resource * resource)
 2  *
 3  * @return The newly allocated surface.
 4  */
 5-struct swc_surface * swc_surface_new(struct wl_client * client, uint32_t id)
 6+struct swc_surface * swc_surface_new(struct wl_client * client,
 7+                                     uint32_t version, uint32_t id)
 8 {
 9     struct swc_surface * surface;
10 
11@@ -364,7 +365,7 @@ struct swc_surface * swc_surface_new(struct wl_client * client, uint32_t id)
12 
13     /* Add the surface to the client. */
14     surface->resource = wl_resource_create(client, &wl_surface_interface,
15-                                           1, id);
16+                                           version, id);
17     wl_resource_set_implementation(surface->resource, &surface_implementation,
18                                    surface, &surface_destroy);
19 
+2, -1
 1@@ -124,7 +124,8 @@ struct swc_surface
 2     struct wl_list link;
 3 };
 4 
 5-struct swc_surface * swc_surface_new(struct wl_client * client, uint32_t id);
 6+struct swc_surface * swc_surface_new(struct wl_client * client,
 7+                                     uint32_t version, uint32_t id);
 8 
 9 void swc_surface_send_frame_callbacks(struct swc_surface * surface,
10                                       uint32_t time);