From 3e8842e1f8d50263d56b0df3ae37708b4be428d6 Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Fri, 24 Jun 2022 15:59:59 +0200 Subject: [PATCH] fix janky pixel maths with scaled textures --- src/render/OpenGL.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/render/OpenGL.cpp b/src/render/OpenGL.cpp index bc5d80ca..85dd29be 100644 --- a/src/render/OpenGL.cpp +++ b/src/render/OpenGL.cpp @@ -378,8 +378,8 @@ void CHyprOpenGLImpl::renderTextureInternalWithDamage(const CTexture& tex, wlr_b // so we need to do some maf const auto TOPLEFT = Vector2D(round, round); - const auto BOTTOMRIGHT = Vector2D(tex.m_vSize.x - round, tex.m_vSize.y - round); - const auto FULLSIZE = tex.m_vSize; + const auto BOTTOMRIGHT = Vector2D(pBox->width - round, pBox->height - round); + const auto FULLSIZE = Vector2D(pBox->width, pBox->height); static auto *const PMULTISAMPLEEDGES = &g_pConfigManager->getConfigValuePtr("decoration:multisample_edges")->intValue; // Rounded corners