summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2022-11-02 13:15:27 +0100
committerLiang Qi <liang.qi@qt.io>2022-11-08 14:23:10 +0100
commit8b1f37cc801420157e94ce459fe22605f8cc486e (patch)
tree68284168852f8742b21190320ea922062fd00b32 /tests
parent5ef07e5bd0f9f330ea091e1daa2d0481cfca2727 (diff)
downloadqtwayland-8b1f37cc801420157e94ce459fe22605f8cc486e.tar.gz
tests: fix tst_seatv4 to use 24 as default cursor size
Also set default cursor size to 24 for client, which is correct both on KDE and GNOME at least. Fixes: QTBUG-104259 Pick-to: 6.4 6.2 5.15 Change-Id: Ie4ba27695974025b093a86d8c96fb23d25ad23f7 Reviewed-by: Inho Lee <inho.lee@qt.io> Reviewed-by: David Edmundson <davidedmundson@kde.org> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/client/seatv4/tst_seatv4.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/tests/auto/client/seatv4/tst_seatv4.cpp b/tests/auto/client/seatv4/tst_seatv4.cpp
index 873b0ff6..314569a1 100644
--- a/tests/auto/client/seatv4/tst_seatv4.cpp
+++ b/tests/auto/client/seatv4/tst_seatv4.cpp
@@ -38,6 +38,7 @@ class tst_seatv4 : public QObject, private SeatV4Compositor
{
Q_OBJECT
private slots:
+ void init();
void cleanup();
void bindsToSeat();
void keyboardKeyPress();
@@ -60,6 +61,12 @@ private slots:
#endif
};
+void tst_seatv4::init()
+{
+ // Remove the extra outputs to clean up for the next test
+ exec([&] { while (auto *o = output(1)) remove(o); });
+}
+
void tst_seatv4::cleanup()
{
QTRY_VERIFY2(isClean(), qPrintable(dirtyMessage()));
@@ -110,7 +117,7 @@ void tst_seatv4::setsCursorOnEnter()
window.show();
QCOMPOSITOR_TRY_VERIFY(xdgSurface() && xdgSurface()->m_committedConfigureSerial);
- exec([&] { pointer()->sendEnter(xdgSurface()->m_surface, {32, 32}); });
+ exec([&] { pointer()->sendEnter(xdgSurface()->m_surface, {24, 24}); });
QCOMPOSITOR_TRY_VERIFY(cursorSurface());
}
@@ -335,7 +342,7 @@ static bool supportsCursorSizes(const QList<uint> &sizes)
static uint defaultCursorSize() {
const int xCursorSize = qEnvironmentVariableIntValue("XCURSOR_SIZE");
- return xCursorSize > 0 ? uint(xCursorSize) : 32;
+ return xCursorSize > 0 ? uint(xCursorSize) : 24;
}
void tst_seatv4::scaledCursor()