summaryrefslogtreecommitdiffstats
path: root/tests/auto/client/shared/mocksurface.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/client/shared/mocksurface.cpp')
-rw-r--r--tests/auto/client/shared/mocksurface.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/tests/auto/client/shared/mocksurface.cpp b/tests/auto/client/shared/mocksurface.cpp
index c0d51618c..84dcda6b0 100644
--- a/tests/auto/client/shared/mocksurface.cpp
+++ b/tests/auto/client/shared/mocksurface.cpp
@@ -74,7 +74,7 @@ void Compositor::sendShellSurfaceConfigure(void *data, const QList<QVariant> &pa
auto statesBytes = QByteArray::fromRawData(reinterpret_cast<const char *>(states.data()),
states.size() * static_cast<int>(sizeof(uint)));
toplevel->send_configure(size.width(), size.height(), statesBytes);
- toplevel->xdgSurface()->send_configure(compositor->nextSerial());
+ toplevel->xdgSurface()->sendConfigure(compositor->nextSerial());
} else if (auto wlShellSurface = surface->wlShellSurface()) {
const uint edges = 0;
wlShellSurface->send_configure(edges, size.width(), size.height());
@@ -123,13 +123,17 @@ void Surface::surface_destroy(Resource *resource)
if (m_wlShellSurface) // on wl-shell the shell surface is automatically destroyed with the surface
wl_resource_destroy(m_wlShellSurface->resource()->handle);
Q_ASSERT(!m_wlShellSurface);
- Q_ASSERT(!m_xdgToplevelV6);
+ Q_ASSERT(!m_xdgSurfaceV6);
wl_resource_destroy(resource->handle);
}
-void Surface::surface_attach(Resource *resource,
- struct wl_resource *buffer, int x, int y)
+void Surface::surface_attach(Resource *resource, struct wl_resource *buffer, int x, int y)
{
+ if (m_xdgSurfaceV6) {
+ // It's a protocol error to attach a buffer to an xdgSurface that's not configured
+ Q_ASSERT(xdgSurfaceV6()->configureSent());
+ }
+
Q_UNUSED(resource);
Q_UNUSED(x);
Q_UNUSED(y);