window.c: Don't allocate proxy manually
authorKristian Høgsberg <krh@bitplanet.net>
Fri, 29 Jun 2012 02:04:06 +0000 (22:04 -0400)
committerKristian Høgsberg <krh@bitplanet.net>
Fri, 29 Jun 2012 02:04:06 +0000 (22:04 -0400)
With the wayland change to automatically allocate the client side proxy
manually, we can now drop the code (and the FIXME) that did that and just
receive the proxy from the callback arguments.

clients/window.c

index 438eaf6..8f3c942 100644 (file)
@@ -2226,7 +2226,8 @@ data_offer_destroy(struct data_offer *offer)
 
 static void
 data_device_data_offer(void *data,
-                      struct wl_data_device *data_device, uint32_t id)
+                      struct wl_data_device *data_device,
+                      struct wl_data_offer *_offer)
 {
        struct data_offer *offer;
 
@@ -2235,12 +2236,7 @@ data_device_data_offer(void *data,
        wl_array_init(&offer->types);
        offer->refcount = 1;
        offer->input = data;
-
-       /* FIXME: Generate typesafe wrappers for this */
-       offer->offer = (struct wl_data_offer *)
-               wl_proxy_create_for_id((struct wl_proxy *) data_device,
-                                      id, &wl_data_offer_interface);
-
+       offer->offer = _offer;
        wl_data_offer_add_listener(offer->offer,
                                   &data_offer_listener, offer);
 }