From ab9d58cd4200cedfdd80e04d88791d14692bad1c Mon Sep 17 00:00:00 2001 From: Ilya Fedin Date: Wed, 11 Sep 2024 23:19:17 +0400 Subject: [PATCH] Client: Use QPlatformWindow's DPR for fallback cursor scale and ceil it This should provide a crisper cursor than flooring and QPlatformWindow is a more right choice than QWindow. Change-Id: I4d0a50e7e513b632532f8561fe709428599fab2c Reviewed-by: David Edmundson --- src/plugins/platforms/wayland/qwaylandcursor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/platforms/wayland/qwaylandcursor.cpp b/src/plugins/platforms/wayland/qwaylandcursor.cpp index 98d51a8425e..4bdd053e8c8 100644 --- a/src/plugins/platforms/wayland/qwaylandcursor.cpp +++ b/src/plugins/platforms/wayland/qwaylandcursor.cpp @@ -317,7 +317,7 @@ void QWaylandCursor::changeCursor(QCursor *cursor, QWindow *window) if (cursor && cursor->shape() == Qt::BitmapCursor) bitmapBuffer = cursorBitmapBuffer(mDisplay, cursor); - int fallbackOutputScale = int(window->devicePixelRatio()); + int fallbackOutputScale = qCeil(window->handle()->devicePixelRatio()); const auto seats = mDisplay->inputDevices(); for (auto *seat : seats) seat->setCursor(cursor, bitmapBuffer, fallbackOutputScale);