vcl/source/app/salvtables.cxx | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-)
New commits: commit bb49c800b7d080978d54730fcb1ffad05de3101a Author: Szymon Kłos <szymon.k...@collabora.com> AuthorDate: Mon Jan 17 13:11:19 2022 +0100 Commit: Henry Castro <hcas...@collabora.com> CommitDate: Mon Jan 24 13:16:56 2022 +0100 RTL: lok: render correctly interim windows Change-Id: Iec23fba24464c6d29ecb63d3d2018ded8d9937f1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128500 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Henry Castro <hcas...@collabora.com> diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx index 9ea77f27162a..d1345a8af5b7 100644 --- a/vcl/source/app/salvtables.cxx +++ b/vcl/source/app/salvtables.cxx @@ -1233,6 +1233,8 @@ void DoRecursivePaint(vcl::Window* pWindow, const Point& rPos, OutputDevice& rOu rOutput.DrawOutDev(rPos, aSize, Point(), aSize, *xOutput); + bool bHasMirroredGraphics = pWindow->GetOutDev()->HasMirroredGraphics(); + xOutput.disposeAndClear(); for (vcl::Window* pChild = pWindow->GetWindow(GetWindowType::FirstChild); pChild; @@ -1240,7 +1242,17 @@ void DoRecursivePaint(vcl::Window* pWindow, const Point& rPos, OutputDevice& rOu { if (!pChild->IsVisible()) continue; - DoRecursivePaint(pChild, rPos + pChild->GetPosPixel(), rOutput); + + tools::Long nDeltaX = pChild->GetOutOffXPixel() - pWindow->GetOutOffXPixel(); + if (bHasMirroredGraphics) + nDeltaX = pWindow->GetOutputWidthPixel() - nDeltaX - pChild->GetOutputWidthPixel(); + + tools::Long nDeltaY = pChild->GetOutOffYPixel() - pWindow->GetOutOffYPixel(); + + Point aPos(rPos); + aPos += Point(nDeltaX, nDeltaY); + + DoRecursivePaint(pChild, aPos, rOutput); } } }