summaryrefslogtreecommitdiff
path: root/src/render/Renderer.cpp
diff options
context:
space:
mode:
authorbea4dev <34712108+bea4dev@users.noreply.github.com>2025-11-07 04:18:16 +0900
committerGitHub <noreply@github.com>2025-11-06 19:18:16 +0000
commitca4b68e42538cb38234152ea3fc7e63363844e13 (patch)
treefd899795e70c33bc627bf0d926f78f3b2dfe8d25 /src/render/Renderer.cpp
parent8e8bfbb0b146fb1f3234b2a3e3e92b63989e1993 (diff)
renderer: fix fractional scale artifact (#12219)
Diffstat (limited to 'src/render/Renderer.cpp')
-rw-r--r--src/render/Renderer.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/render/Renderer.cpp b/src/render/Renderer.cpp
index 14ed1469..8bb50c38 100644
--- a/src/render/Renderer.cpp
+++ b/src/render/Renderer.cpp
@@ -1137,13 +1137,11 @@ void CHyprRenderer::calculateUVForSurface(PHLWINDOW pWindow, SP<CWLSurfaceResour
const Vector2D MISALIGNMENT = pSurface->m_current.bufferSize - projSize;
if (MISALIGNMENT != Vector2D{})
uvBR -= MISALIGNMENT * PIXELASUV;
- }
-
- // if the surface is smaller than our viewport, extend its edges.
- // this will break if later on xdg geometry is hit, but we really try
- // to let the apps know to NOT add CSD. Also if source is there.
- // there is no way to fix this if that's the case
- {
+ } else {
+ // if the surface is smaller than our viewport, extend its edges.
+ // this will break if later on xdg geometry is hit, but we really try
+ // to let the apps know to NOT add CSD. Also if source is there.
+ // there is no way to fix this if that's the case
const auto MONITOR_WL_SCALE = std::ceil(pMonitor->m_scale);
const bool SCALE_UNAWARE = MONITOR_WL_SCALE > 1 && (MONITOR_WL_SCALE == pSurface->m_current.scale || !pSurface->m_current.viewport.hasDestination);
const auto EXPECTED_SIZE = getSurfaceExpectedSize(pWindow, pSurface, pMonitor, main).value_or((projSize * pMonitor->m_scale).round());