summaryrefslogtreecommitdiffstats
path: root/tests/auto/compositor/mockclient.cpp
diff options
context:
space:
mode:
authorGiulio Camuffo <giulio.camuffo@jollamobile.com>2014-08-14 17:38:52 +0300
committerGiulio Camuffo <giulio.camuffo@jollamobile.com>2014-08-15 11:16:40 +0200
commitd516f7dc9b41529d7986d3b6a9483d49702734f9 (patch)
tree4b1a5574b346e3b4c9b094c79d59fe589164f52a /tests/auto/compositor/mockclient.cpp
parent6842ece98dc4b496fca075b6f864d8f78c1057d0 (diff)
Fix compositor tests
The test compositor was not updated after recent QtCompositor changes. Make sure to create and use wl_shell and fix the "repaint" loop in the frameCallback test Change-Id: I06515f114a3b7b755c22aef7d193d48fda94d7af Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
Diffstat (limited to 'tests/auto/compositor/mockclient.cpp')
-rw-r--r--tests/auto/compositor/mockclient.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/auto/compositor/mockclient.cpp b/tests/auto/compositor/mockclient.cpp
index 4204e3936..2ee997ed5 100644
--- a/tests/auto/compositor/mockclient.cpp
+++ b/tests/auto/compositor/mockclient.cpp
@@ -61,6 +61,7 @@ MockClient::MockClient()
, compositor(0)
, output(0)
, registry(0)
+ , wlshell(0)
{
if (!display)
qFatal("MockClient(): wl_display_connect() failed");
@@ -135,6 +136,8 @@ void MockClient::handleGlobal(uint32_t id, const QByteArray &interface)
wl_output_add_listener(output, &outputListener, this);
} else if (interface == "wl_shm") {
shm = static_cast<wl_shm *>(wl_registry_bind(registry, id, &wl_shm_interface, 1));
+ } else if (interface == "wl_shell") {
+ wlshell = static_cast<wl_shell *>(wl_registry_bind(registry, id, &wl_shell_interface, 1));
}
}
@@ -144,6 +147,12 @@ wl_surface *MockClient::createSurface()
return wl_compositor_create_surface(compositor);
}
+wl_shell_surface *MockClient::createShellSurface(wl_surface *surface)
+{
+ flushDisplay();
+ return wl_shell_get_shell_surface(wlshell, surface);
+}
+
ShmBuffer::ShmBuffer(const QSize &size, wl_shm *shm)
: handle(0)
{