summaryrefslogtreecommitdiffstats
path: root/tests/auto/client/shared/mockxdgshellv6.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/client/shared/mockxdgshellv6.cpp')
-rw-r--r--tests/auto/client/shared/mockxdgshellv6.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/tests/auto/client/shared/mockxdgshellv6.cpp b/tests/auto/client/shared/mockxdgshellv6.cpp
index 5dc8da599..05eff74ad 100644
--- a/tests/auto/client/shared/mockxdgshellv6.cpp
+++ b/tests/auto/client/shared/mockxdgshellv6.cpp
@@ -49,6 +49,18 @@ XdgSurfaceV6::XdgSurfaceV6(XdgShellV6 *shell, Surface *surface, wl_client *clien
, m_surface(surface)
, m_shell(shell)
{
+ m_surface->m_xdgSurfaceV6 = this;
+}
+
+XdgSurfaceV6::~XdgSurfaceV6()
+{
+ m_surface->m_xdgSurfaceV6 = nullptr;
+}
+
+void XdgSurfaceV6::sendConfigure(uint32_t serial)
+{
+ send_configure(serial);
+ m_configureSent = true;
}
void XdgSurfaceV6::zxdg_surface_v6_get_toplevel(QtWaylandServer::zxdg_surface_v6::Resource *resource, uint32_t id)
@@ -78,7 +90,6 @@ XdgToplevelV6::XdgToplevelV6(XdgSurfaceV6 *xdgSurface, wl_client *client, uint32
, m_mockToplevel(new MockXdgToplevelV6(this))
{
auto *surface = m_xdgSurface->surface();
- surface->m_xdgToplevelV6 = this;
m_xdgSurface->shell()->addToplevel(this);
surface->map();
}
@@ -86,7 +97,6 @@ XdgToplevelV6::XdgToplevelV6(XdgSurfaceV6 *xdgSurface, wl_client *client, uint32
XdgToplevelV6::~XdgToplevelV6()
{
m_xdgSurface->shell()->removeToplevel(this);
- m_xdgSurface->surface()->m_xdgToplevelV6 = nullptr;
m_mockToplevel->m_toplevel = nullptr;
}