Client: Map Qt::BusyCursor and Qt::WaitCursor to correct shape names

This amends 883cfa228332465b6aa1023f0787927187c828e6.

They are mapped vice versa. The wait cursor displays only an hourglass,
while the busy cursor usually displays an arrow and an hourglass.

Pick-to: 6.7 6.6
Change-Id: I449086f71b00993c061e8a56983c77925246dc37
Reviewed-by: David Edmundson <davidedmundson@kde.org>
This commit is contained in:
Vlad Zahorodnii 2024-02-02 13:59:00 +02:00
parent fc63491355
commit 88b3411b87
2 changed files with 4 additions and 4 deletions

View File

@ -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:

View File

@ -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();