cursordelgate: round cursor position when rendering
Otherwise there can be weird artifacts when screen scaling is involved (cherry picked from commit 3334fb8752bb1e5dd40d8fa9969c8ba24d2547b8)icc-effect-5.27.2
parent
aa700a13d6
commit
699d7fdd88
|
@ -13,6 +13,8 @@
|
|||
#include "kwinglutils.h"
|
||||
#include "scene/cursorscene.h"
|
||||
|
||||
#include <cmath>
|
||||
|
||||
namespace KWin
|
||||
{
|
||||
|
||||
|
@ -48,7 +50,7 @@ void CursorDelegateOpenGL::paint(RenderTarget *renderTarget, const QRegion ®i
|
|||
|
||||
QMatrix4x4 mvp;
|
||||
mvp.ortho(QRect(QPoint(0, 0), renderTarget->size()));
|
||||
mvp.translate(cursorRect.x() * scale, cursorRect.y() * scale);
|
||||
mvp.translate(std::round(cursorRect.x() * scale), std::round(cursorRect.y() * scale));
|
||||
|
||||
GLFramebuffer *fbo = std::get<GLFramebuffer *>(renderTarget->nativeHandle());
|
||||
GLFramebuffer::pushFramebuffer(fbo);
|
||||
|
|
Loading…
Reference in New Issue