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/mockwlshell.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/mockwlshell.cpp')
-rw-r--r-- | tests/auto/client/shared/mockwlshell.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/auto/client/shared/mockwlshell.cpp b/tests/auto/client/shared/mockwlshell.cpp index b7700713f..50e539932 100644 --- a/tests/auto/client/shared/mockwlshell.cpp +++ b/tests/auto/client/shared/mockwlshell.cpp @@ -31,19 +31,19 @@ namespace Impl { -class WlShellSurface : public QtWaylandServer::wl_shell_surface -{ -public: - explicit WlShellSurface(::wl_client *client, int id, Surface *surface); - void shell_surface_destroy_resource(Resource *) override { delete this; } -}; - WlShellSurface::WlShellSurface(wl_client *client, int id, Surface *surface) : QtWaylandServer::wl_shell_surface(client, id, 1) + , m_surface(surface) { + surface->m_wlShellSurface = this; surface->map(); } +WlShellSurface::~WlShellSurface() +{ + m_surface->m_wlShellSurface = nullptr; +} + void WlShell::shell_get_shell_surface(QtWaylandServer::wl_shell::Resource *resource, uint32_t id, wl_resource *surface) { new WlShellSurface(resource->client(), id, Surface::fromResource(surface)); |