summaryrefslogtreecommitdiffstats
path: root/tests/auto/client/xdgshell/tst_xdgshell.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/client/xdgshell/tst_xdgshell.cpp')
-rw-r--r--tests/auto/client/xdgshell/tst_xdgshell.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/auto/client/xdgshell/tst_xdgshell.cpp b/tests/auto/client/xdgshell/tst_xdgshell.cpp
index 55e994b0..1bfabe55 100644
--- a/tests/auto/client/xdgshell/tst_xdgshell.cpp
+++ b/tests/auto/client/xdgshell/tst_xdgshell.cpp
@@ -43,6 +43,7 @@ private slots:
void configureStates();
void popup();
void pongs();
+ void minMaxSize();
};
void tst_xdgshell::showMinimized()
@@ -265,5 +266,26 @@ void tst_xdgshell::pongs()
QCOMPARE(pongSpy.first().at(0).toUInt(), serial);
}
+void tst_xdgshell::minMaxSize()
+{
+ QRasterWindow window;
+ window.setMinimumSize(QSize(100, 100));
+ window.setMaximumSize(QSize(1000, 1000));
+ window.resize(400, 320);
+ window.show();
+ QCOMPOSITOR_TRY_VERIFY(xdgToplevel());
+
+ exec([=] { xdgToplevel()->sendCompleteConfigure(); });
+
+ QCOMPOSITOR_TRY_COMPARE(xdgToplevel()->m_committed.minSize, QSize(100, 100));
+ QCOMPOSITOR_TRY_COMPARE(xdgToplevel()->m_committed.maxSize, QSize(1000, 1000));
+
+ window.setMaximumSize(QSize(500, 400));
+ QCOMPOSITOR_TRY_COMPARE(xdgToplevel()->m_committed.maxSize, QSize(500, 400));
+
+ window.setMinimumSize(QSize(50, 40));
+ QCOMPOSITOR_TRY_COMPARE(xdgToplevel()->m_committed.minSize, QSize(50, 40));
+}
+
QCOMPOSITOR_TEST_MAIN(tst_xdgshell)
#include "tst_xdgshell.moc"