diff --git a/input.cpp b/input.cpp index 10648d68b2..2fadcb4c68 100644 --- a/input.cpp +++ b/input.cpp @@ -1692,7 +1692,7 @@ public: QImage cursorImage; cursorImage = buffer->data().copy(); - cursorImage.setDevicePixelRatio(cursorSurface->scale()); + cursorImage.setDevicePixelRatio(cursorSurface->bufferScale()); cursor->updateCursor(cursorImage, tcursor->hotspot()); }); diff --git a/pointer_input.cpp b/pointer_input.cpp index e2eab9c731..f8fd97a702 100644 --- a/pointer_input.cpp +++ b/pointer_input.cpp @@ -1110,7 +1110,7 @@ void CursorImage::updateServerCursor() } m_serverCursor.cursor.hotspot = c->hotspot(); m_serverCursor.cursor.image = buffer->data().copy(); - m_serverCursor.cursor.image.setDevicePixelRatio(cursorSurface->scale()); + m_serverCursor.cursor.image.setDevicePixelRatio(cursorSurface->bufferScale()); if (needsEmit) { emit changed(); } @@ -1207,7 +1207,7 @@ void CursorImage::updateDragCursor() if (additionalIcon.isNull()) { m_drag.cursor.image = buffer->data().copy(); - m_drag.cursor.image.setDevicePixelRatio(cursorSurface->scale()); + m_drag.cursor.image.setDevicePixelRatio(cursorSurface->bufferScale()); } else { QRect cursorRect = buffer->data().rect(); QRect iconRect = additionalIcon.rect(); @@ -1224,7 +1224,7 @@ void CursorImage::updateDragCursor() } m_drag.cursor.image = QImage(cursorRect.united(iconRect).size(), QImage::Format_ARGB32_Premultiplied); - m_drag.cursor.image.setDevicePixelRatio(cursorSurface->scale()); + m_drag.cursor.image.setDevicePixelRatio(cursorSurface->bufferScale()); m_drag.cursor.image.fill(Qt::transparent); QPainter p(&m_drag.cursor.image); p.drawImage(iconRect, additionalIcon); diff --git a/scene.cpp b/scene.cpp index c33d224144..a056e5aa19 100644 --- a/scene.cpp +++ b/scene.cpp @@ -1259,7 +1259,7 @@ QPoint WindowPixmap::framePosition() const qreal WindowPixmap::scale() const { if (surface()) - return surface()->scale(); + return surface()->bufferScale(); return toplevel()->bufferScale(); } diff --git a/toplevel.cpp b/toplevel.cpp index e5e9e82b48..c8041132c3 100644 --- a/toplevel.cpp +++ b/toplevel.cpp @@ -552,7 +552,7 @@ qreal Toplevel::screenScale() const qreal Toplevel::bufferScale() const { - return surface() ? surface()->scale() : 1; + return surface() ? surface()->bufferScale() : 1; } bool Toplevel::isOnScreen(int screen) const