diff --git a/src/scenes/opengl/scene_opengl.cpp b/src/scenes/opengl/scene_opengl.cpp index d06ea5406b..890d33ca43 100644 --- a/src/scenes/opengl/scene_opengl.cpp +++ b/src/scenes/opengl/scene_opengl.cpp @@ -376,7 +376,7 @@ void SceneOpenGL::createRenderNode(Item *item, RenderContext *context) .transformMatrix = context->transformStack.top(), .opacity = context->opacityStack.top(), .hasAlpha = hasAlpha, - .coordinateType = UnnormalizedCoordinates, + .coordinateType = NormalizedCoordinates, }); } } diff --git a/src/surfaceitem.cpp b/src/surfaceitem.cpp index 8924702755..60bbf4d905 100644 --- a/src/surfaceitem.cpp +++ b/src/surfaceitem.cpp @@ -140,10 +140,12 @@ WindowQuadList SurfaceItem::buildQuads() const const QPointF bufferBottomRight = m_surfaceToBufferMatrix.map(rect.bottomRight()); const QPointF bufferBottomLeft = m_surfaceToBufferMatrix.map(rect.bottomLeft()); - quad[0] = WindowVertex(rect.topLeft(), bufferTopLeft); - quad[1] = WindowVertex(rect.topRight(), bufferTopRight); - quad[2] = WindowVertex(rect.bottomRight(), bufferBottomRight); - quad[3] = WindowVertex(rect.bottomLeft(), bufferBottomLeft); + const auto size = m_pixmap->size(); + + quad[0] = WindowVertex(rect.topLeft(), QPointF{bufferTopLeft.x() / size.width(), bufferTopLeft.y() / size.height()}); + quad[1] = WindowVertex(rect.topRight(), QPointF{bufferTopRight.x() / size.width(), bufferTopRight.y() / size.height()}); + quad[2] = WindowVertex(rect.bottomRight(), QPointF{bufferBottomRight.x() / size.width(), bufferBottomRight.y() / size.height()}); + quad[3] = WindowVertex(rect.bottomLeft(), QPointF{bufferBottomLeft.x() / size.width(), bufferBottomLeft.y() / size.height()}); quads << quad; }