diff --git a/autotests/integration/pointer_input.cpp b/autotests/integration/pointer_input.cpp index 0f7ddccb75..6e64205f7b 100644 --- a/autotests/integration/pointer_input.cpp +++ b/autotests/integration/pointer_input.cpp @@ -64,7 +64,6 @@ static PlatformCursorImage loadReferenceThemeCursor_helper(const KXcursorTheme & cursorImage.setDevicePixelRatio(theme.devicePixelRatio()); QPoint cursorHotspot = sprites.first().hotspot(); - cursorHotspot /= theme.devicePixelRatio(); return PlatformCursorImage(cursorImage, cursorHotspot); } diff --git a/pointer_input.cpp b/pointer_input.cpp index 1d35f86311..c79aa0b59c 100644 --- a/pointer_input.cpp +++ b/pointer_input.cpp @@ -1322,7 +1322,6 @@ bool WaylandCursorImage::loadThemeCursor_helper(const QByteArray &name, Image *c cursorImage->image.setDevicePixelRatio(m_cursorTheme.devicePixelRatio()); cursorImage->hotspot = sprites.first().hotspot(); - cursorImage->hotspot /= m_cursorTheme.devicePixelRatio(); return true; } diff --git a/xcursortheme.cpp b/xcursortheme.cpp index d0893ea82a..fb33c50cd1 100644 --- a/xcursortheme.cpp +++ b/xcursortheme.cpp @@ -96,7 +96,7 @@ static void load_callback(XcursorImages *images, void *data) QImage data(nativeCursorImage->width, nativeCursorImage->height, QImage::Format_ARGB32); memcpy(data.bits(), nativeCursorImage->pixels, data.sizeInBytes()); - sprites.append(KXcursorSprite(data, hotspot, delay)); + sprites.append(KXcursorSprite(data, hotspot / themePrivate->devicePixelRatio, delay)); } themePrivate->registry.insert(images->name, sprites); diff --git a/xcursortheme.h b/xcursortheme.h index 0436d87e2e..e61718d74f 100644 --- a/xcursortheme.h +++ b/xcursortheme.h @@ -71,7 +71,7 @@ public: /** * Returns the hotspot for this sprite. (0, 0) corresponds to the upper left corner. * - * The coordinates of the hotspot are in device pixels. + * The coordinates of the hotspot are in device independent pixels. */ QPoint hotspot() const;