[Libreoffice-commits] core.git: vcl/source
Caolán McNamara
caolanm at redhat.com
Tue Dec 12 20:38:46 UTC 2017
vcl/source/window/window.cxx | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 6315b8cbbd7b7e67d824e1dba4414bdf61e3e061
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Dec 12 14:17:11 2017 +0000
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/46314
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index f2a9d47e16b5..1e76d47890a2 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -1865,7 +1865,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 );
@@ -1880,7 +1880,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() )
More information about the Libreoffice-commits
mailing list