summaryrefslogtreecommitdiff
path: root/src/helpers/SubsurfaceTree.cpp
diff options
context:
space:
mode:
authorvaxerski <vaxry@vaxry.net>2023-06-11 21:52:13 +0200
committervaxerski <vaxry@vaxry.net>2023-06-11 21:52:13 +0200
commit6beb79f27b84c36b8b9ef5476d861a94a9071009 (patch)
tree54860720b2a564141c1127cb53746a423b5fcda7 /src/helpers/SubsurfaceTree.cpp
parent64ce06a3536898ddae7146e8f649361ce081c8d6 (diff)
xwayland: add force_zero_scaling
Diffstat (limited to 'src/helpers/SubsurfaceTree.cpp')
-rw-r--r--src/helpers/SubsurfaceTree.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/helpers/SubsurfaceTree.cpp b/src/helpers/SubsurfaceTree.cpp
index 40cda642..7058d32e 100644
--- a/src/helpers/SubsurfaceTree.cpp
+++ b/src/helpers/SubsurfaceTree.cpp
@@ -229,6 +229,8 @@ void Events::listener_commitSubsurface(void* owner, void* data) {
addSurfaceGlobalOffset(pNode, &lx, &ly);
+ const double SCALE = pNode->pWindowOwner && pNode->pWindowOwner->m_bIsX11 ? 1.0 / pNode->pWindowOwner->m_fX11SurfaceScaledBy : 1.0;
+
// I do not think this is correct, but it solves a lot of issues with some apps (e.g. firefox)
// What this does is that basically, if the pNode is a child of some other node, on commit,
// it will also damage (check & damage if needed) all its siblings.
@@ -237,12 +239,12 @@ void Events::listener_commitSubsurface(void* owner, void* data) {
const auto NODECOORDS = pNode->pSubsurface ? Vector2D(pNode->pSubsurface->pSubsurface->current.x, pNode->pSubsurface->pSubsurface->current.y) : Vector2D();
if (&cs != pNode->pSubsurface && cs.pSubsurface) {
- g_pHyprRenderer->damageSurface(cs.pSubsurface->surface, lx - NODECOORDS.x + cs.pSubsurface->current.x, ly - NODECOORDS.y + cs.pSubsurface->current.y);
+ g_pHyprRenderer->damageSurface(cs.pSubsurface->surface, lx - NODECOORDS.x + cs.pSubsurface->current.x, ly - NODECOORDS.y + cs.pSubsurface->current.y, SCALE);
}
}
if (pNode->pSurface && pNode->pSurface->exists())
- g_pHyprRenderer->damageSurface(pNode->pSurface->wlr(), lx, ly);
+ g_pHyprRenderer->damageSurface(pNode->pSurface->wlr(), lx, ly, SCALE);
}
void Events::listener_destroySubsurface(void* owner, void* data) {