aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorvaxerski <[email protected]>2023-01-22 16:58:10 +0100
committervaxerski <[email protected]>2023-01-22 16:58:10 +0100
commit147be3e10bf39e48e020622f9aa868f8bc53d8d9 (patch)
tree19647eeb6b5ffc25c3d91f0549a7681f817f319d
parentb963a6624e544f7dde99d00585cb8f58fee0e723 (diff)
downloadHyprland-147be3e10bf39e48e020622f9aa868f8bc53d8d9.tar.gz
Hyprland-147be3e10bf39e48e020622f9aa868f8bc53d8d9.zip
use goal size for uv calcs
-rw-r--r--src/render/Renderer.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/render/Renderer.cpp b/src/render/Renderer.cpp
index 53843e9b..4875fb77 100644
--- a/src/render/Renderer.cpp
+++ b/src/render/Renderer.cpp
@@ -577,7 +577,7 @@ void CHyprRenderer::calculateUVForWindowSurface(CWindow* pWindow, wlr_surface* p
wlr_xdg_surface_get_geometry(pWindow->m_uSurface.xdg, &geom);
// ignore X and Y, adjust uv
- if (geom.x != 0 || geom.y != 0 || geom.width > pWindow->m_vRealSize.vec().x || geom.height > pWindow->m_vRealSize.vec().y) {
+ if (geom.x != 0 || geom.y != 0 || geom.width > pWindow->m_vRealSize.goalv().x || geom.height > pWindow->m_vRealSize.goalv().y) {
const auto XPERC = (double)geom.x / (double)pSurface->current.width;
const auto YPERC = (double)geom.y / (double)pSurface->current.height;
const auto WPERC = (double)(geom.x + geom.width) / (double)pSurface->current.width;
@@ -587,9 +587,9 @@ void CHyprRenderer::calculateUVForWindowSurface(CWindow* pWindow, wlr_surface* p
uvBR = uvBR - Vector2D(1.0 - WPERC * (uvBR.x - uvTL.x), 1.0 - HPERC * (uvBR.y - uvTL.y));
uvTL = uvTL + TOADDTL;
- if (geom.width > pWindow->m_vRealSize.vec().x || geom.height > pWindow->m_vRealSize.vec().y) {
- uvBR.x = uvBR.x * (pWindow->m_vRealSize.vec().x / geom.width);
- uvBR.y = uvBR.y * (pWindow->m_vRealSize.vec().y / geom.height);
+ if (geom.width > pWindow->m_vRealSize.goalv().x || geom.height > pWindow->m_vRealSize.goalv().y) {
+ uvBR.x = uvBR.x * (pWindow->m_vRealSize.goalv().x / geom.width);
+ uvBR.y = uvBR.y * (pWindow->m_vRealSize.goalv().y / geom.height);
}
}