summaryrefslogtreecommitdiffstats
path: root/tests/auto/client/xdgshell
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/xdgshell
parentfb764cd406dd64dcb4caf0df2dca8b621d80f58b (diff)
Client: Test for xdg surface window geometry
Change-Id: I2f336a81682317b1f7dc939d911906b4db60a386 Reviewed-by: Johan Helsing <johan.helsing@qt.io>
Diffstat (limited to 'tests/auto/client/xdgshell')
-rw-r--r--tests/auto/client/xdgshell/tst_xdgshell.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/auto/client/xdgshell/tst_xdgshell.cpp b/tests/auto/client/xdgshell/tst_xdgshell.cpp
index 1bfabe55..de034101 100644
--- a/tests/auto/client/xdgshell/tst_xdgshell.cpp
+++ b/tests/auto/client/xdgshell/tst_xdgshell.cpp
@@ -44,6 +44,7 @@ private slots:
void popup();
void pongs();
void minMaxSize();
+ void windowGeometry();
};
void tst_xdgshell::showMinimized()
@@ -287,5 +288,20 @@ void tst_xdgshell::minMaxSize()
QCOMPOSITOR_TRY_COMPARE(xdgToplevel()->m_committed.minSize, QSize(50, 40));
}
+void tst_xdgshell::windowGeometry()
+{
+ QRasterWindow window;
+ window.resize(400, 320);
+ window.show();
+ QCOMPOSITOR_TRY_VERIFY(xdgToplevel());
+
+ exec([=] { xdgToplevel()->sendCompleteConfigure(); });
+
+ QCOMPOSITOR_TRY_COMPARE(xdgSurface()->m_committed.windowGeometry, QRect(QPoint(0, 0), window.frameGeometry().size()));
+
+ window.resize(800, 600);
+ QCOMPOSITOR_TRY_COMPARE(xdgSurface()->m_committed.windowGeometry, QRect(QPoint(0, 0), window.frameGeometry().size()));
+}
+
QCOMPOSITOR_TEST_MAIN(tst_xdgshell)
#include "tst_xdgshell.moc"