summaryrefslogtreecommitdiff
path: root/vcl/source/window/window.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/source/window/window.cxx')
-rw-r--r--vcl/source/window/window.cxx19
1 files changed, 9 insertions, 10 deletions
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index 8e24ef5a87a6..79d966383877 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -2913,13 +2913,18 @@ tools::Rectangle Window::ImplUnmirroredAbsoluteScreenToOutputPixel( const tools:
}
-tools::Rectangle Window::GetWindowExtentsRelative(const vcl::Window *pRelativeWindow) const
+// with decoration
+tools::Rectangle Window::GetWindowExtentsRelative(const vcl::Window & rRelativeWindow) const
{
- // with decoration
- return ImplGetWindowExtentsRelative( pRelativeWindow );
+ tools::Rectangle aRect = GetWindowExtentsAbsolute();
+ // #106399# express coordinates relative to borderwindow
+ const vcl::Window *pRelWin = rRelativeWindow.mpWindowImpl->mpBorderWindow ? rRelativeWindow.mpWindowImpl->mpBorderWindow.get() : &rRelativeWindow;
+ aRect.SetPos( pRelWin->AbsoluteScreenToOutputPixel( aRect.GetPos() ) );
+ return aRect;
}
-tools::Rectangle Window::ImplGetWindowExtentsRelative(const vcl::Window *pRelativeWindow) const
+// with decoration
+tools::Rectangle Window::GetWindowExtentsAbsolute() const
{
// make sure we use the extent of our border window,
// otherwise we miss a few pixels
@@ -2936,12 +2941,6 @@ tools::Rectangle Window::ImplGetWindowExtentsRelative(const vcl::Window *pRelati
aSize.AdjustWidth(g.leftDecoration() + g.rightDecoration() );
aSize.AdjustHeight(g.topDecoration() + g.bottomDecoration() );
}
- if( pRelativeWindow )
- {
- // #106399# express coordinates relative to borderwindow
- const vcl::Window *pRelWin = pRelativeWindow->mpWindowImpl->mpBorderWindow ? pRelativeWindow->mpWindowImpl->mpBorderWindow.get() : pRelativeWindow;
- aPos = pRelWin->AbsoluteScreenToOutputPixel( aPos );
- }
return tools::Rectangle( aPos, aSize );
}