summaryrefslogtreecommitdiff
path: root/vcl/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2023-07-19 14:30:37 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2023-07-20 08:15:20 +0200
commit669d6ed4fa2e7a01c372a6e27dd5468ec8eb3077 (patch)
treed6d29afc6bbedadabf8e12c4d9f2133d15e50105 /vcl/source
parent4bba62e69bae1d1e065b8634b2fea291372ea1ba (diff)
simplify the operation of ImplGetWindowExtentsRelative
instead of inlining OutputToAbsoluteScreenPixel Change-Id: I4914392e6dfb5c1ace7041642fecbaa084cf7626 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154652 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/source')
-rw-r--r--vcl/source/window/window.cxx6
1 files changed, 2 insertions, 4 deletions
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index c07433173287..8e24ef5a87a6 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -2921,18 +2921,16 @@ tools::Rectangle Window::GetWindowExtentsRelative(const vcl::Window *pRelativeWi
tools::Rectangle Window::ImplGetWindowExtentsRelative(const vcl::Window *pRelativeWindow) const
{
- SalFrameGeometry g = mpWindowImpl->mpFrame->GetGeometry();
// make sure we use the extent of our border window,
// otherwise we miss a few pixels
const vcl::Window *pWin = mpWindowImpl->mpBorderWindow ? mpWindowImpl->mpBorderWindow : this;
- Point aPos( pWin->OutputToScreenPixel( Point(0,0) ) );
- aPos.AdjustX(g.x() );
- aPos.AdjustY(g.y() );
+ Point aPos( pWin->OutputToAbsoluteScreenPixel( Point(0,0) ) );
Size aSize ( pWin->GetSizePixel() );
// #104088# do not add decoration to the workwindow to be compatible to java accessibility api
if( mpWindowImpl->mbFrame || (mpWindowImpl->mpBorderWindow && mpWindowImpl->mpBorderWindow->mpWindowImpl->mbFrame && GetType() != WindowType::WORKWINDOW) )
{
+ SalFrameGeometry g = mpWindowImpl->mpFrame->GetGeometry();
aPos.AdjustX( -sal_Int32(g.leftDecoration()) );
aPos.AdjustY( -sal_Int32(g.topDecoration()) );
aSize.AdjustWidth(g.leftDecoration() + g.rightDecoration() );