summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-12-12 14:17:11 +0000
committerMichael Stahl <mstahl@redhat.com>2017-12-15 12:04:01 +0100
commit0b100b78ccb24a4f8da51433f535030facb77705 (patch)
tree332f2701ebdd6a49f389eddddb25ed5289bd7107 /vcl
parent94ab4cedfaf44a2ff92b7ae53b549e771c970b43 (diff)
tdf#114408 set correct tooltip rectangle
The original code tried to get the position of the window relative to its parent and then ask the parent to adjust that position to a position relative to the toplevel. But the position to use in that case should have be WindowImpl::nX/WindowImpl::nY not GetPosPixel() Much easier to just directly ask the the current window for its position relative to the toplevel. Change-Id: Iff202f052bc651a8c0e3a57ff3322e5e2a3e4b9a Reviewed-on: https://gerrit.libreoffice.org/46315 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/window/window.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index 5083f418b2c2..84dabd027689 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -1861,7 +1861,7 @@ void Window::RequestHelp( const HelpEvent& rHEvt )
{
Point aPos = GetPosPixel();
if ( ImplGetParent() && !ImplIsOverlapWindow() )
- aPos = ImplGetParent()->OutputToScreenPixel( aPos );
+ aPos = OutputToScreenPixel(Point(0, 0));
tools::Rectangle aRect( aPos, GetSizePixel() );
Help::ShowBalloon( this, rHEvt.GetMousePosPixel(), aRect, rStr );
@@ -1876,7 +1876,7 @@ void Window::RequestHelp( const HelpEvent& rHEvt )
{
Point aPos = GetPosPixel();
if ( ImplGetParent() && !ImplIsOverlapWindow() )
- aPos = ImplGetParent()->OutputToScreenPixel( aPos );
+ aPos = OutputToScreenPixel(Point(0, 0));
tools::Rectangle aRect( aPos, GetSizePixel() );
OUString aHelpText;
if ( !rStr.isEmpty() )