summaryrefslogtreecommitdiff
path: root/tests/auto/client/shared/xdgshell.cpp
diff options
context:
space:
mode:
authorPier Luigi Fiorini <pierluigi.fiorini@liri.io>2019-01-13 23:28:06 +0100
committerPier Luigi Fiorini <pierluigi.fiorini@liri.io>2019-01-15 10:50:23 +0000
commiteef9f34e58465458420f6e1295bdce4a59702c54 (patch)
tree5b587640f888da816c43f5ec96bdc301f1ed261b /tests/auto/client/shared/xdgshell.cpp
parentfb764cd406dd64dcb4caf0df2dca8b621d80f58b (diff)
downloadqtwayland-eef9f34e58465458420f6e1295bdce4a59702c54.tar.gz
Client: Test for xdg surface window geometry
Change-Id: I2f336a81682317b1f7dc939d911906b4db60a386 Reviewed-by: Johan Helsing <johan.helsing@qt.io>
Diffstat (limited to 'tests/auto/client/shared/xdgshell.cpp')
-rw-r--r--tests/auto/client/shared/xdgshell.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/auto/client/shared/xdgshell.cpp b/tests/auto/client/shared/xdgshell.cpp
index 4cabd3d8..6bc30302 100644
--- a/tests/auto/client/shared/xdgshell.cpp
+++ b/tests/auto/client/shared/xdgshell.cpp
@@ -86,6 +86,8 @@ XdgSurface::XdgSurface(XdgWmBase *xdgWmBase, Surface *surface, wl_client *client
connect(this, &XdgSurface::toplevelCreated, xdgWmBase, &XdgWmBase::toplevelCreated);
connect(surface, &Surface::attach, this, &XdgSurface::verifyConfigured);
connect(surface, &Surface::commit, this, [this] {
+ m_committed = m_pending;
+
if (m_ackedConfigureSerial != m_committedConfigureSerial) {
m_committedConfigureSerial = m_ackedConfigureSerial;
emit configureCommitted(m_committedConfigureSerial);
@@ -133,6 +135,14 @@ void XdgSurface::xdg_surface_destroy_resource(Resource *resource)
delete this;
}
+void XdgSurface::xdg_surface_set_window_geometry(Resource *resource, int32_t x, int32_t y, int32_t width, int32_t height)
+{
+ Q_UNUSED(resource);
+ QRect rect(x, y, width, height);
+ QVERIFY(rect.isValid());
+ m_pending.windowGeometry = rect;
+}
+
void XdgSurface::xdg_surface_ack_configure(Resource *resource, uint32_t serial)
{
Q_UNUSED(resource);