summaryrefslogtreecommitdiffstats
path: root/tests/auto/client/shared/xdgshell.h
diff options
context:
space:
mode:
authorJohan Klokkhammer Helsing <johan.helsing@qt.io>2019-01-10 15:12:07 +0100
committerJohan Helsing <johan.helsing@qt.io>2019-01-15 08:35:59 +0000
commitb70148fde1d30add67ca6dd5ef63a37842f53f81 (patch)
tree99372799b2cd52d82210852afbc805c8121999d3 /tests/auto/client/shared/xdgshell.h
parent5698f22afbd0e6be273f31cf8b934383e7b68cdb (diff)
Client: Test for xdg toplevel min and max size
Change-Id: I60605f494eebfde9a7737911eefe69a93041ced5 Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
Diffstat (limited to 'tests/auto/client/shared/xdgshell.h')
-rw-r--r--tests/auto/client/shared/xdgshell.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/tests/auto/client/shared/xdgshell.h b/tests/auto/client/shared/xdgshell.h
index 3fcec7983..037de20d1 100644
--- a/tests/auto/client/shared/xdgshell.h
+++ b/tests/auto/client/shared/xdgshell.h
@@ -99,14 +99,24 @@ protected:
void xdg_surface_ack_configure(Resource *resource, uint32_t serial) override;
};
-class XdgToplevel : public QtWaylandServer::xdg_toplevel
+class XdgToplevel : public QObject, public QtWaylandServer::xdg_toplevel
{
+ Q_OBJECT
public:
explicit XdgToplevel(XdgSurface *xdgSurface, int id, int version = 1);
void sendConfigure(const QSize &size = {0, 0}, const QVector<uint> &states = {});
uint sendCompleteConfigure(const QSize &size = {0, 0}, const QVector<uint> &states = {});
Surface *surface() { return m_xdgSurface->m_surface; }
+
XdgSurface *m_xdgSurface = nullptr;
+ struct DoubleBufferedState {
+ QSize minSize = {0, 0};
+ QSize maxSize = {0, 0};
+ } m_pending, m_committed;
+
+protected:
+ void xdg_toplevel_set_max_size(Resource *resource, int32_t width, int32_t height) override;
+ void xdg_toplevel_set_min_size(Resource *resource, int32_t width, int32_t height) override;
};
class XdgPopup : public QtWaylandServer::xdg_popup