From 0177295c91cccc4394de41cd4d01f2736bf2ad43 Mon Sep 17 00:00:00 2001 From: Johan Klokkhammer Helsing Date: Mon, 26 Feb 2018 16:52:18 +0100 Subject: Send configure events in shell-agnostic client tests xdg-shell >= unstable v6 requires surfaces to be configured before buffers can be attached. Make sure to send a configure event when a compositor would normally do it. Task-number: QTBUG-66510 Change-Id: Icbff6ebaa597e858d92d621849aa0df7a8a976f3 Reviewed-by: Andy Nichols --- tests/auto/client/shared/mockxdgshellv6.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'tests/auto/client/shared/mockxdgshellv6.cpp') diff --git a/tests/auto/client/shared/mockxdgshellv6.cpp b/tests/auto/client/shared/mockxdgshellv6.cpp index 5c83f2db3..39e03296d 100644 --- a/tests/auto/client/shared/mockxdgshellv6.cpp +++ b/tests/auto/client/shared/mockxdgshellv6.cpp @@ -55,7 +55,6 @@ void XdgSurfaceV6::zxdg_surface_v6_get_toplevel(QtWaylandServer::zxdg_surface_v6 { int version = wl_resource_get_version(resource->handle); m_toplevel = new XdgToplevelV6(this, resource->client(), id, version); - m_surface->map(); } void XdgSurfaceV6::zxdg_surface_v6_destroy(QtWaylandServer::zxdg_surface_v6::Resource *resource) @@ -69,12 +68,16 @@ XdgToplevelV6::XdgToplevelV6(XdgSurfaceV6 *xdgSurface, wl_client *client, uint32 , m_xdgSurface(xdgSurface) , m_mockToplevel(new MockXdgToplevelV6(this)) { + auto *surface = m_xdgSurface->surface(); + surface->m_xdgToplevelV6 = this; m_xdgSurface->shell()->addToplevel(this); + surface->map(); } XdgToplevelV6::~XdgToplevelV6() { m_xdgSurface->shell()->removeToplevel(this); + m_xdgSurface->surface()->m_xdgToplevelV6 = nullptr; m_mockToplevel->m_toplevel = nullptr; } -- cgit v1.2.3