summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVlad Zahorodnii <vlad.zahorodnii@kde.org>2024-02-02 13:59:00 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2024-02-06 17:28:11 +0000
commitbf0d953bf081e8cb39dc8dd0e2906f6b6b9f3ffb (patch)
tree4f273e4a597816dbd939354294ed4529779c3e33
parentc2e3979d88fd0bde036af7f0e23a732bff9ad7ec (diff)
Client: Map Qt::BusyCursor and Qt::WaitCursor to correct shape names
This amends b1cae06cb65658dcddf01a596ea95cfd7c0ebdc2. They are mapped vice versa. The wait cursor displays only an hourglass, while the busy cursor usually displays an arrow and an hourglass. Change-Id: I449086f71b00993c061e8a56983c77925246dc37 Reviewed-by: David Edmundson <davidedmundson@kde.org> (cherry picked from commit a7c0c33f0d686d5d85bb910a192e0bf17aba7f61) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 6f3f62d337553e590ca769c96f3e9becef77709c)
-rw-r--r--src/client/qwaylandcursor.cpp4
-rw-r--r--tests/auto/client/cursor/tst_cursor.cpp4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/client/qwaylandcursor.cpp b/src/client/qwaylandcursor.cpp
index e7464ed8f..98d51a842 100644
--- a/src/client/qwaylandcursor.cpp
+++ b/src/client/qwaylandcursor.cpp
@@ -247,11 +247,11 @@ static QtWayland::wp_cursor_shape_device_v1::shape qtCursorShapeToWaylandShape(Q
case Qt::SizeFDiagCursor:
return wp_cursor_shape_device_v1::shape_nwse_resize;
case Qt::WaitCursor:
- return wp_cursor_shape_device_v1::shape_progress;
+ return wp_cursor_shape_device_v1::shape_wait;
case Qt::SizeAllCursor:
return wp_cursor_shape_device_v1::shape_all_scroll;
case Qt::BusyCursor:
- return wp_cursor_shape_device_v1::shape_wait;
+ return wp_cursor_shape_device_v1::shape_progress;
case Qt::SplitVCursor:
return wp_cursor_shape_device_v1::shape_row_resize;
case Qt::ForbiddenCursor:
diff --git a/tests/auto/client/cursor/tst_cursor.cpp b/tests/auto/client/cursor/tst_cursor.cpp
index c86392b95..8681eff11 100644
--- a/tests/auto/client/cursor/tst_cursor.cpp
+++ b/tests/auto/client/cursor/tst_cursor.cpp
@@ -65,7 +65,7 @@ void tst_cursor::setCursor()
QCOMPARE(setCursorShapeSpy.takeFirst().at(0).toUInt(), enterSerial);
// client sets a different shape
- window.setCursor(QCursor(Qt::BusyCursor));
+ window.setCursor(QCursor(Qt::WaitCursor));
QVERIFY(setCursorShapeSpy.wait());
QCOMPOSITOR_COMPARE(cursorShape()->m_currentShape, CursorShapeDevice::shape_wait);
@@ -88,7 +88,7 @@ void tst_cursor::setCursor()
// set a shape again
window.setCursor(QCursor(Qt::BusyCursor));
QVERIFY(setCursorShapeSpy.wait());
- QCOMPOSITOR_COMPARE(cursorShape()->m_currentShape, CursorShapeDevice::shape_wait);
+ QCOMPOSITOR_COMPARE(cursorShape()->m_currentShape, CursorShapeDevice::shape_progress);
setCursorShapeSpy.clear();