Client: Ceil cursor's fallback buffer scale

This should provide a crisper cursor

Change-Id: Iaa3108cc2c6346e9db9755975ca2718875f470b7
Reviewed-by: David Edmundson <davidedmundson@kde.org>
This commit is contained in:
Ilya Fedin 2024-09-11 15:31:39 +04:00
parent 92af4c8d2b
commit ceebf0d57a

View File

@ -1495,7 +1495,7 @@ void QWaylandWindow::setScale(qreal newScale)
#if QT_CONFIG(cursor) #if QT_CONFIG(cursor)
void QWaylandWindow::setMouseCursor(QWaylandInputDevice *device, const QCursor &cursor) void QWaylandWindow::setMouseCursor(QWaylandInputDevice *device, const QCursor &cursor)
{ {
int fallbackBufferScale = int(devicePixelRatio()); int fallbackBufferScale = qCeil(devicePixelRatio());
device->setCursor(&cursor, {}, fallbackBufferScale); device->setCursor(&cursor, {}, fallbackBufferScale);
} }