summaryrefslogtreecommitdiffstats
path: root/tests/auto/client/client/mockshell.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/client/client/mockshell.cpp')
-rw-r--r--tests/auto/client/client/mockshell.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/auto/client/client/mockshell.cpp b/tests/auto/client/client/mockshell.cpp
index 2ce5965a3..d5eede22e 100644
--- a/tests/auto/client/client/mockshell.cpp
+++ b/tests/auto/client/client/mockshell.cpp
@@ -159,8 +159,9 @@ static void get_shell_surface(wl_client *client, wl_resource *compositorResource
shell_surface_set_class
};
- Q_UNUSED(compositorResource);
- wl_client_add_object(client, &wl_shell_surface_interface, &shellSurfaceInterface, id, surfaceResource->data);
+ int version = wl_resource_get_version(compositorResource);
+ wl_resource *shellSurface = wl_resource_create(client, &wl_shell_surface_interface, version, id);
+ wl_resource_set_implementation(shellSurface, &shellSurfaceInterface, surfaceResource->data, nullptr);
Surface *surf = Surface::fromResource(surfaceResource);
surf->map();
}
@@ -171,8 +172,8 @@ void Compositor::bindShell(wl_client *client, void *compositorData, uint32_t ver
get_shell_surface
};
- Q_UNUSED(version);
- wl_client_add_object(client, &wl_shell_interface, &shellInterface, id, compositorData);
+ wl_resource *resource = wl_resource_create(client, &wl_shell_interface, static_cast<int>(version), id);
+ wl_resource_set_implementation(resource, &shellInterface, compositorData, nullptr);
}
}