summaryrefslogtreecommitdiff
path: root/vcl/source/window
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-12-14 14:05:53 +0000
committerCaolán McNamara <caolanm@redhat.com>2016-01-28 10:41:44 +0000
commit77e21efcdde2589a56c029c663cd75e105edd1fd (patch)
tree34809299b00750c427d3989e97fc7b1010f6551b /vcl/source/window
parent32333afd215ffcdc320845937dd524a08fe4f9b0 (diff)
Related: rhbz#1289394 always provide the screen area the tip applies to
this will make it easier to implement native help tips Change-Id: I984dfadaf02e9b7bf542ba82cf070911c89cb699 (cherry picked from commit 01ef12d173fb2c54a49186c8eb4fa40288b82945)
Diffstat (limited to 'vcl/source/window')
-rw-r--r--vcl/source/window/menuwindow.cxx2
-rw-r--r--vcl/source/window/window.cxx9
2 files changed, 9 insertions, 2 deletions
diff --git a/vcl/source/window/menuwindow.cxx b/vcl/source/window/menuwindow.cxx
index 72a1baecbb3f..83ca0b610975 100644
--- a/vcl/source/window/menuwindow.cxx
+++ b/vcl/source/window/menuwindow.cxx
@@ -63,7 +63,7 @@ bool MenuWindow::ImplHandleHelpEvent(vcl::Window* pMenuWindow, Menu* pMenu, sal_
Rectangle aRect( aPos, Size() );
if (!pMenu->GetHelpText(nId).isEmpty())
- Help::ShowBalloon( pMenuWindow, aPos, pMenu->GetHelpText( nId ) );
+ Help::ShowBalloon( pMenuWindow, aPos, aRect, pMenu->GetHelpText( nId ) );
else
{
// give user a chance to read the full filename
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index a064650f40bb..d1b5bc1a5842 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -2007,7 +2007,14 @@ void Window::RequestHelp( const HelpEvent& rHEvt )
if ( rStr.isEmpty() && ImplGetParent() && !ImplIsOverlapWindow() )
ImplGetParent()->RequestHelp( rHEvt );
else
- Help::ShowBalloon( this, rHEvt.GetMousePosPixel(), rStr );
+ {
+ Point aPos = GetPosPixel();
+ if ( ImplGetParent() && !ImplIsOverlapWindow() )
+ aPos = ImplGetParent()->OutputToScreenPixel( aPos );
+ Rectangle aRect( aPos, GetSizePixel() );
+
+ Help::ShowBalloon( this, rHEvt.GetMousePosPixel(), aRect, rStr );
+ }
}
else if ( rHEvt.GetMode() & HelpEventMode::QUICK )
{