summaryrefslogtreecommitdiff
path: root/src/desktop/WLSurface.cpp
diff options
context:
space:
mode:
authorVaxry <43317083+vaxerski@users.noreply.github.com>2025-09-21 19:27:56 +0200
committerGitHub <noreply@github.com>2025-09-21 19:27:56 +0200
commit26cbc67385d95ba621fe0a125a5b121ffdd09335 (patch)
tree2aa7c05ce78ab4ea55e8df81f1c99553509b37b1 /src/desktop/WLSurface.cpp
parent41dad381770300fe1015ad8cdd1f370a8fd4e5d5 (diff)
renderer: fix uv calculations once and for all (#11770)
fixes synchronization of ackd sizes, fixes wrong xdg stuff
Diffstat (limited to 'src/desktop/WLSurface.cpp')
-rw-r--r--src/desktop/WLSurface.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/desktop/WLSurface.cpp b/src/desktop/WLSurface.cpp
index d868e1a9..1a1bd293 100644
--- a/src/desktop/WLSurface.cpp
+++ b/src/desktop/WLSurface.cpp
@@ -62,9 +62,10 @@ bool CWLSurface::small() const {
if (!m_resource->m_current.texture)
return false;
- const auto O = m_windowOwner.lock();
+ const auto O = m_windowOwner.lock();
+ const auto REPORTED_SIZE = O->getReportedSize();
- return O->m_reportedSize.x > m_resource->m_current.size.x + 1 || O->m_reportedSize.y > m_resource->m_current.size.y + 1;
+ return REPORTED_SIZE.x > m_resource->m_current.size.x + 1 || REPORTED_SIZE.y > m_resource->m_current.size.y + 1;
}
Vector2D CWLSurface::correctSmallVec() const {
@@ -73,8 +74,9 @@ Vector2D CWLSurface::correctSmallVec() const {
const auto SIZE = getViewporterCorrectedSize();
const auto O = m_windowOwner.lock();
+ const auto REP = O->getReportedSize();
- return Vector2D{(O->m_reportedSize.x - SIZE.x) / 2, (O->m_reportedSize.y - SIZE.y) / 2}.clamp({}, {INFINITY, INFINITY}) * (O->m_realSize->value() / O->m_reportedSize);
+ return Vector2D{(REP.x - SIZE.x) / 2, (REP.y - SIZE.y) / 2}.clamp({}, {INFINITY, INFINITY}) * (O->m_realSize->value() / REP);
}
Vector2D CWLSurface::correctSmallVecBuf() const {