diff options
author | Johan Klokkhammer Helsing <johan.helsing@qt.io> | 2018-02-26 16:52:18 +0100 |
---|---|---|
committer | Johan Helsing <johan.helsing@qt.io> | 2018-03-08 16:29:45 +0000 |
commit | 0177295c91cccc4394de41cd4d01f2736bf2ad43 (patch) | |
tree | 24b509519b65c1e2085dccd170088220ecd40505 /tests/auto/client/shared/mockxdgshellv6.cpp | |
parent | 18175b6eb8d8cfdc12003186ec1829579a35fef4 (diff) |
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 <andy.nichols@qt.io>
Diffstat (limited to 'tests/auto/client/shared/mockxdgshellv6.cpp')
-rw-r--r-- | tests/auto/client/shared/mockxdgshellv6.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
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; } |