summaryrefslogtreecommitdiffstats
path: root/src/compositor/global
diff options
context:
space:
mode:
authorHannu Lyytinen <hannu.lyytinen@nomovok.com>2012-04-18 23:14:47 +0300
committerSamuel Rødal <samuel.rodal@nokia.com>2012-04-19 09:10:18 +0200
commitf3fde00e041b5a974f49f994ea96b8db729f96cc (patch)
tree8248007ab3f1c5ff5d206ffa232541d826859d41 /src/compositor/global
parentf83a56dcb4b0a81a51e56bb516cb98de75fc6ae5 (diff)
Sync up with the latest wayland developments.
This commit makes the qtwayland module compatible with wayland sha1 677c5180e67be18b7a0867fafb7f205b57a6e9ff. Change-Id: I5af0510034b7e4a038313b80f1f6e0b18fa48eb3 Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com> Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Diffstat (limited to 'src/compositor/global')
-rw-r--r--src/compositor/global/waylandresourcecollection.cpp10
-rw-r--r--src/compositor/global/waylandresourcecollection.h4
2 files changed, 5 insertions, 9 deletions
diff --git a/src/compositor/global/waylandresourcecollection.cpp b/src/compositor/global/waylandresourcecollection.cpp
index 2bbf8dbae..c69618204 100644
--- a/src/compositor/global/waylandresourcecollection.cpp
+++ b/src/compositor/global/waylandresourcecollection.cpp
@@ -58,8 +58,8 @@ void ResourceCollection::registerResource(struct wl_resource *resource)
{
wl_list_insert(&client_resources,&resource->link);
struct wl_listener *listener = new struct wl_listener;
- listener->func = ResourceCollection::destroy_listener_func;
- wl_list_insert(&resource->destroy_listener_list,&listener->link);
+ listener->notify = ResourceCollection::destroy_listener_notify;
+ wl_signal_add(&resource->destroy_signal, listener);
}
struct wl_resource *ResourceCollection::resourceForClient(wl_client *client) const
@@ -79,11 +79,9 @@ bool ResourceCollection::resourceListIsEmpty() const
return wl_list_empty(const_cast<struct wl_list *>(&client_resources));
}
-void ResourceCollection::destroy_listener_func(struct wl_listener *listener,
- wl_resource *resource,
- uint32_t time)
+void ResourceCollection::destroy_listener_notify(struct wl_listener *listener, void *data)
{
- Q_UNUSED(time);
+ struct wl_resource *resource = reinterpret_cast<struct wl_resource *>(data);
wl_list_remove(&resource->link);
delete listener;
}
diff --git a/src/compositor/global/waylandresourcecollection.h b/src/compositor/global/waylandresourcecollection.h
index cc2311fea..9fff65f04 100644
--- a/src/compositor/global/waylandresourcecollection.h
+++ b/src/compositor/global/waylandresourcecollection.h
@@ -57,9 +57,7 @@ public:
protected:
struct wl_list client_resources;
private:
- static void destroy_listener_func(struct wl_listener *listener,
- struct wl_resource *resource, uint32_t time);
-
+ static void destroy_listener_notify(struct wl_listener *listener, void *data);
};
}