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/mockwlshell.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'tests/auto/client/shared/mockwlshell.cpp') 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)); -- cgit v1.2.3