summaryrefslogtreecommitdiffstats
path: root/tests/auto/client/shared/xdgshell.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/client/shared/xdgshell.cpp')
-rw-r--r--tests/auto/client/shared/xdgshell.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/auto/client/shared/xdgshell.cpp b/tests/auto/client/shared/xdgshell.cpp
index ebbcc294..4cabd3d8 100644
--- a/tests/auto/client/shared/xdgshell.cpp
+++ b/tests/auto/client/shared/xdgshell.cpp
@@ -149,6 +149,7 @@ XdgToplevel::XdgToplevel(XdgSurface *xdgSurface, int id, int version)
: QtWaylandServer::xdg_toplevel(xdgSurface->resource()->client(), id, version)
, m_xdgSurface(xdgSurface)
{
+ connect(surface(), &Surface::commit, this, [this] { m_committed = m_pending; });
}
void XdgToplevel::sendConfigure(const QSize &size, const QVector<uint> &states)
@@ -162,6 +163,22 @@ uint XdgToplevel::sendCompleteConfigure(const QSize &size, const QVector<uint> &
return m_xdgSurface->sendConfigure();
}
+void XdgToplevel::xdg_toplevel_set_max_size(Resource *resource, int32_t width, int32_t height)
+{
+ Q_UNUSED(resource);
+ QSize size(width, height);
+ QVERIFY(size.isValid());
+ m_pending.maxSize = size;
+}
+
+void XdgToplevel::xdg_toplevel_set_min_size(Resource *resource, int32_t width, int32_t height)
+{
+ Q_UNUSED(resource);
+ QSize size(width, height);
+ QVERIFY(size.isValid());
+ m_pending.minSize = size;
+}
+
XdgPopup::XdgPopup(XdgSurface *xdgSurface, int id, int version)
: QtWaylandServer::xdg_popup(xdgSurface->resource()->client(), id, version)
, m_xdgSurface(xdgSurface)