summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorVaxry <43317083+vaxerski@users.noreply.github.com>2025-10-24 22:19:21 +0100
committerGitHub <noreply@github.com>2025-10-24 22:19:21 +0100
commitda04afa44e7545771b08f8e0defd2cd1810f1613 (patch)
treecf3a9daf87abb8bc32f7c7ac32a45bf2dc1eb649 /src
parent34812c33dbfdac33093c84b3edf5076838cbf2a6 (diff)
surface: fix xwayland zero scaling damage calcs (#12123)
Diffstat (limited to 'src')
-rw-r--r--src/desktop/WLSurface.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/desktop/WLSurface.cpp b/src/desktop/WLSurface.cpp
index ff6a69de..a7b654f0 100644
--- a/src/desktop/WLSurface.cpp
+++ b/src/desktop/WLSurface.cpp
@@ -122,11 +122,12 @@ CRegion CWLSurface::computeDamage() const {
const Vector2D SCALE = SURFSIZE / m_resource->m_current.bufferSize;
damage.scale(SCALE);
- if (BOX.has_value())
- damage.intersect(CBox{{}, BOX->size()});
-
- if (m_windowOwner)
- damage.scale(m_windowOwner->m_X11SurfaceScaledBy); // fix xwayland:force_zero_scaling stuff that will be fucked by the above a bit
+ if (BOX.has_value()) {
+ if (m_windowOwner)
+ damage.intersect(CBox{{}, BOX->size() * m_windowOwner->m_X11SurfaceScaledBy});
+ else
+ damage.intersect(CBox{{}, BOX->size()});
+ }
return damage;
}