diff options
author | Johan Klokkhammer Helsing <johan.helsing@qt.io> | 2018-09-12 14:17:43 +0200 |
---|---|---|
committer | Johan Helsing <johan.helsing@qt.io> | 2018-09-18 12:13:30 +0000 |
commit | 54113bb70ccc2df74c55d881b543d13fd4eb9550 (patch) | |
tree | 0ecc667fa05df3d03f266fe55a0030c2a3d181a3 /tests | |
parent | ae4326db18b99630766e73c2f873eb883db2f493 (diff) |
Don't use members of wl_resource
When we switch to only including core wayland headers, wl_resource will be an
opaque type. Use the getters and setter functions instead.
Task-number: QTBUG-70553
Change-Id: I7d84d48a4ee3586f231a331cd15716686dcee775
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/client/shared/mockcompositor.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/auto/client/shared/mockcompositor.cpp b/tests/auto/client/shared/mockcompositor.cpp index 077b8ee05..797c05c44 100644 --- a/tests/auto/client/shared/mockcompositor.cpp +++ b/tests/auto/client/shared/mockcompositor.cpp @@ -400,7 +400,7 @@ void Compositor::dispatchEvents(int timeout) static void compositor_create_surface(wl_client *client, wl_resource *compositorResource, uint32_t id) { - Compositor *compositor = static_cast<Compositor *>(compositorResource->data); + Compositor *compositor = static_cast<Compositor *>(wl_resource_get_user_data(compositorResource)); compositor->addSurface(new Surface(client, id, wl_resource_get_version(compositorResource), compositor)); } @@ -425,18 +425,18 @@ void Compositor::bindCompositor(wl_client *client, void *compositorData, uint32_ static void unregisterResourceCallback(wl_listener *listener, void *data) { struct wl_resource *resource = reinterpret_cast<struct wl_resource *>(data); - wl_list_remove(&resource->link); + wl_list_remove(wl_resource_get_link(resource)); delete listener; } void registerResource(wl_list *list, wl_resource *resource) { - wl_list_insert(list, &resource->link); + wl_list_insert(list, wl_resource_get_link(resource)); wl_listener *listener = new wl_listener; listener->notify = unregisterResourceCallback; - wl_signal_add(&resource->destroy_signal, listener); + wl_resource_add_destroy_listener(resource, listener); } QVector<Surface *> Compositor::surfaces() const |