From 8733b33f9fcc3173cc9211feb0d84d6994fdc606 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Kristian=20H=C3=B8gsberg?= Date: Thu, 28 Jun 2012 22:04:06 -0400 Subject: [PATCH] window.c: Don't allocate proxy manually 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 | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/clients/window.c b/clients/window.c index 438eaf6..8f3c942 100644 --- a/clients/window.c +++ b/clients/window.c @@ -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); } -- 2.7.4